Hi,
northof40 wrote:
> I want to extract the roles relevant for a given
class/method from the
> database . This is no problem but it seems to me that
it's impossible
> to assign these at run time (bear in mind I need method
level
> granularity not just class protection).
I have modified MultiAuth to do just this, but I think it
only works in
the case where you protect the whole class by inheriting
from
ProtectedClass .
Basically it just involved adding a new argument to
ProtectedClass'
__init__ method (the function to use to get the roles from
database) and
tweaking the secure decorator so that the function gets
called (class
name & method name as arguments) and returned roles
appended to the
_roles list.
I can send you the code if you want to, after I've cleaned
it a bit
(might take the weekend).
-Ari
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "cherrypy-users" group.
To post to this group, send email to cherrypy-users googlegroups.com
To unsubscribe from this group, send email to
cherrypy-users-unsubscribe googlegroups.com
For more options, visit this group at http://
groups.google.com/group/cherrypy-users
-~----------~----~----~----~------~----~------~--~---
|