[Zope-dev] Question about setting roles

James W. Howe jwh@allencreek.com
Thu, 24 Feb 2000 15:28:48 -0500


I'm trying to track down why my subclass of folder seems to be having 
problems with permissions.  I've discovered that if I override the 
definition of manage_main with my own template, security doesn't work 
correctly for that template.  In particular, when the filtered options code 
is executed, my manage_main only has a role of 'Manager', but my folder 
instance allows 'Manager' and 'Publisher' for View Management Screens.

The one thing I don't understand is how roles are assigned to template 
objects.  For example, where/when were the roles assigned to my manage_main 
template?  I've worked through the code to see how the 
manage_changePermissions works,  but that only seems to set the permissions 
for the containing object, in this case my Folder subclass instance.  In my 
case, it sets the _View_management_screens_Permission to ['Manager', 
'Publisher'].  How and when does this information make it back to the 
objects associated with this permission?  How (when/where) would the roles 
be set for my manage_main template?

I'm going to continue to look at things to see if I can figure this out 
myself, but it would help a great deal if someone could point me in the 
right direction.

Thanks!

James W. Howe				mailto:jwh@allencreek.com
Allen Creek Software, Inc.		pgpkey: http://ic.net/~jwh/pgpkey.html		
Ann Arbor, MI  48103