[Zope-dev] Re: PROBLEM(100) Init Ambiguous name

Chris Withers chrisw@nipltd.com
Fri, 27 Jul 2001 18:21:24 +0100


Shane Hathaway wrote:
> 
> > What happens if I want to protect manage_editForm with one permission
> > and manage_main with another?
> 
> You can't.  :-)  That's why the ambiguity is a problem.  If the method is
> called manage_editForm, the security machinery (under most circumstance)
> will look for "manage_editForm__roles__" no matter what attribute name
> you used to access it.  Maybe someday this will change.
> 
> > Also, kindof related, what happens if I want to protect a method with
> > more than one permission?
> 
> You can't do that either, and for good reason.  Would it be an OR or an
> AND operation?  Or some combination?  Better to just call
> getSecurityManager().checkPermission().

Thanks :-)

How do we make sure both of these are documented in big flashing letters in the
development guide?
I've been at the python product programming thang for some time (;-) now and I
never knew that, in fact I had made completely incorrect assumptions...

cheers,

Chris
> 
> Shane