From: Timothy M. A. <ti...@ad...> - 2004-05-28 17:03:40
|
On Fri, 2004-05-28 at 02:04, Teemu Arina wrote: > > I've removed > > the links in the templates to the /NewUser action, but you can still > > type it in manually and create a user. > > You can disable /NewUser by removing the action in action.perl in base_user > package, incrementing the version number (in this case, 1.65) in package.conf > and reinstalling the package with oi_manage. > Ahh... I didn't increment the version number. This could bring up possible conflicts, I believe. One of the projects I'm doing this for is going to be a shopping cart, so I'd like people on that site to be able to create their own users, but the administration site I'd like locked down. The NewUser functionality would work perfectly in the former, while it's not good in the latter. If I understand the versioning correctly, this isn't possible with the same OI base path. So, I'd have to have multiple installations of the OI framework on my development box. Not necessarily a problem, but I can see myself struggling on a problem for an hour or so, only to find out that I'm mucking about the wrong OI base. > > OpenInteract::Handler::NewUser.pm in my OI base directory after not > > finding a Cornerstone::Handler::NewUser.pm in the action.perl files. Am > > I off here? > > If your website is called Cornerstone, all OpenInteract::* will be mapped as > Cornerstone::*, in this case, OpenInteract::Handler::NewUser -> > Cornerstone::Handler::NewUser. So, if you want to create your own NewUser > handler, create it with a different Handler name, for example > OpenInteract::Handler::CreateUser or something, remove the NewUser action, > add your own NewUser action and map it to *::CreateUser. Ok, here's what I didn't understand. I removed all traces of the NewUser.pm from my application; at least all that find . -type f -exec grep -il newuser {} \; reported. I then restarted Apache, and the NewUser form was still there. This was why I was (incorrectly, it seems) supposing that we defaulted back to the OI base directory. So, to eliminate the functionality, I should just leave the base_user package alone, create a new package like Cornerstone::Handler::NewUser, map that package to the /NewUser URL, and have it do something completely different like displaying a new user introduction or something? > > And, what is the "correct" way to disable this (or any other) > > functionality? > [SNIP] > I worked around this by just disabling actions provided by some base_* > packages I don't need or adding Handler security that blocks the use of > certain features. Look into sys_security table to know how Handler security > works. Basically, SPOPS objects that have security have a number in object_id > field. Handlers have 0 (zero). [SNIP] > Example of a Handler (action) with security: > > (No one - world - may execute the handler NewUser): > sid: 39610 > class: Example::Handler::NewUser > object_id: 0 > scope: w > scope_id: world > security_level: 1 > > For handlers to use security, the action.perl must not contain security => no > for the action. Ok, currently there is no Cornerstone::Handler::NewUser in the sys_security table. So, I can add it and tweak the security to disallow access. Not the most elegant solution, but it should work. [SNIP] > We have heavily modified the OpenInteract system and replaced most of the > essential actions provided by base_* packages with more robust alternatives > in our Dicole project. You might find it interesting and maybe even useful > for your project. ... [SNIP] I really do like the CSS integration, which is something I was going to try to do on my application. How much is this going to muddy the waters for me? As you've no doubt discovered by now, I'm having a bit of trouble navigating the learning curve. I'm worried that I'll have trouble discerning Dicole issues from OI issues until I've grokked OI a little better. > http://www.dicole.fi/docs/dicole_api_overview.html > http://www.dicole.fi/docs/introduction.html > > Currently in development but first version of a groupware created with it will > be available in August. Does this mean that Dicole will be production in August, or the groupware will be? Thanks again for the patience. Everybody has been quite illuminating with the replies. /tma |