security: propagate security upon saving workspace information; copy principal roles from workspace, too

git-svn-id: svn://svn.cy55.de/Zope3/src/loops/trunk@3903 fd906abe-77d9-0310-91a1-e0d9ade77398
This commit is contained in:
helmutm 2010-06-14 11:19:08 +00:00
parent 793f943f99
commit 5affb38833
2 changed files with 7 additions and 0 deletions

View file

@ -216,6 +216,10 @@ class ManageWorkspaceView(PermissionView):
setPrincipalRole(wsiRM, roleName, gid,
roleWSI and Allow or None)
self.context.workspaceGroupNames = gn
setter = ISecuritySetter(adapted(self.parent))
setter.propagateSecurity()
#setter = ISecuritySetter(adapted(self.context))
#setter.propagateSecurity()
@Lazy
def permission_macros(self):

View file

@ -152,6 +152,9 @@ class ConceptSecuritySetter(LoopsObjectSecuritySetter):
setter.setDefaultRolePermissions()
setter.acquireRolePermissions()
setter.copyPrincipalRoles(self, revert)
wi = baseObject(self.context).workspaceInformation
if wi:
setter.copyPrincipalRoles(ISecuritySetter(wi), revert)
setter.propagateSecurity(revert, updated)
def propagateSecurity(self, revert=False, updated=None):