[gen] klass.creators can now be a method that either returns a list of global roles allowed to create instances of this class, or a boolean indicating if the currently logged user can create instances of this class or not. [gen] Bugfixes.
This commit is contained in:
parent
e1b83574c5
commit
1f901e5545
6 changed files with 64 additions and 55 deletions
|
@ -501,7 +501,9 @@ class ZopeGenerator(Generator):
|
|||
allRoles[role.name] = role
|
||||
# Gather roles from "creators" attributes from every class
|
||||
for cDescr in self.getClasses(include='all'):
|
||||
for role in cDescr.getCreators():
|
||||
creators = cDescr.getCreators()
|
||||
if not creators: continue
|
||||
for role in creators:
|
||||
if role.name not in allRoles:
|
||||
allRoles[role.name] = role
|
||||
res = allRoles.values()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue