[z3-five] Suggested changes in Five/security.py

Lennart Regebro regebro at nuxeo.com
Thu Jan 13 19:41:29 MET 2005


Sidnei da Silva wrote:
> On Thu, Jan 13, 2005 at 07:19:46PM +0100, Lennart Regebro wrote:
> |     if permission is CheckerPublic or permission is None:
> |         return True
> 
> All looks good except the above. If permission is None it just means
> you couldnt find a utility registered by that permission. 

No, that raises an error. At least it did for me.

> I would return False in that case.

I might trap that error and return false then, maybe? But I think that 
never should happen, the ZCML would break if you try to use a 
non-existant permission. I think. Maybe.

-- 
Lennart Regebro, Nuxeo     http://www.nuxeo.com/
CPS Content Management     http://www.cps-project.org/


More information about the z3-five mailing list