Commit e71adc76 authored by 's avatar

Fixed hasRole bug for superuser

parent a27633eb
"""Access control package"""
__version__='$Revision: 1.38 $'[11:-2]
__version__='$Revision: 1.39 $'[11:-2]
from PersistentMapping import PersistentMapping
......@@ -54,7 +54,6 @@ class User(Implicit, Persistent):
def __str__(self): return self.name
__repr__=__str__
try:
f=open('%s/access' % SOFTWARE_HOME, 'r')
data=split(strip(f.readline()),':')
......@@ -64,6 +63,8 @@ try:
except:
super=User('superuser','123',('manage',))
super.hasRole=lambda parent, roles=None: 1
nobody=User('Anonymous User','',('Anonymous',))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment