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:
parent
793f943f99
commit
5affb38833
2 changed files with 7 additions and 0 deletions
|
@ -216,6 +216,10 @@ class ManageWorkspaceView(PermissionView):
|
||||||
setPrincipalRole(wsiRM, roleName, gid,
|
setPrincipalRole(wsiRM, roleName, gid,
|
||||||
roleWSI and Allow or None)
|
roleWSI and Allow or None)
|
||||||
self.context.workspaceGroupNames = gn
|
self.context.workspaceGroupNames = gn
|
||||||
|
setter = ISecuritySetter(adapted(self.parent))
|
||||||
|
setter.propagateSecurity()
|
||||||
|
#setter = ISecuritySetter(adapted(self.context))
|
||||||
|
#setter.propagateSecurity()
|
||||||
|
|
||||||
@Lazy
|
@Lazy
|
||||||
def permission_macros(self):
|
def permission_macros(self):
|
||||||
|
|
|
@ -152,6 +152,9 @@ class ConceptSecuritySetter(LoopsObjectSecuritySetter):
|
||||||
setter.setDefaultRolePermissions()
|
setter.setDefaultRolePermissions()
|
||||||
setter.acquireRolePermissions()
|
setter.acquireRolePermissions()
|
||||||
setter.copyPrincipalRoles(self, revert)
|
setter.copyPrincipalRoles(self, revert)
|
||||||
|
wi = baseObject(self.context).workspaceInformation
|
||||||
|
if wi:
|
||||||
|
setter.copyPrincipalRoles(ISecuritySetter(wi), revert)
|
||||||
setter.propagateSecurity(revert, updated)
|
setter.propagateSecurity(revert, updated)
|
||||||
|
|
||||||
def propagateSecurity(self, revert=False, updated=None):
|
def propagateSecurity(self, revert=False, updated=None):
|
||||||
|
|
Loading…
Add table
Reference in a new issue