You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Jacopo Cappellato <ja...@libero.it> on 2001/10/26 17:08:27 UTC

Security framework (new version)

Hi!

I've made some important (internal) changes to my framework (see my messages
on this subject).
As usual, you can download the last version from this page:
 http://digilander.iol.it/jacop/
Regards,
Jacopo

Major changes:
1) some bug fixes
2) internal re-design:
    a) the security framework's main module was a global scoped Turbine Pull
Tool; now it is a Turbine Service (GrantSecurityService).
        Why this change? The module was not intended to be used from within
templates (a bad place for application logic), and so a Pull Tool
implementation was a bad choice (hmm... sorry but... I'm new to Turbine and
when I wrote the code I didn't know how to build a service, but only how to
create a pull tool... ). I've also created a wrapper class around it, so
when you have to set a task from within a standard module (such as a
VelocityScreen) all you have to do is:
        if (Security.isAllowed("screen.moduleName", "taskName", runData)) {
                // ...
        }
on the other hand, if you are using a class derived from
Unlocked/LockedScreen (see my previous messages on this subject) all you
have to do is (nothing is changed here from the previous version of the
framework):
        if (isAllowed("taskName", runData)) {
                // ...
        }
     The same things apply to actions.
   b) The module security configuration file format is not changed (it's a
property file) but now I've created a factory class and the SecurityLoader
interface: by implementing this interface it's easy  to create new security
loaders (e.g. a security loader that reads the security configuration from
an xml file): the only thing to do to switch from a loader to another one is
to properly set (in the TR file) the GrantSecurityService parameters.




---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org