fix access to manage_workspace page
This commit is contained in:
parent
853782fb35
commit
57588f1e19
2 changed files with 31 additions and 1 deletions
|
@ -1,6 +1,25 @@
|
|||
<html metal:use-macro="context/@@standard_macros/view"
|
||||
i18n:domain="zope">
|
||||
<body>
|
||||
|
||||
<metal:slot fill-slot="breadcrumbs">
|
||||
<div id="breadcrumbs" metal:define-macro="breadcrumbs">
|
||||
<div tal:omit-tag="" i18n:translate="">Location:</div> <tal:block
|
||||
repeat="breadcrumb view/context/__parent__/@@absolute_url/breadcrumbs"
|
||||
><a href=""
|
||||
tal:condition="repeat/breadcrumb/start"
|
||||
tal:attributes="
|
||||
href string:${breadcrumb/url}/@@SelectedManagementView.html"
|
||||
i18n:translate="">[top]</a>
|
||||
<a href=""
|
||||
tal:condition="not:repeat/breadcrumb/start"
|
||||
tal:content="string:${breadcrumb/name}"
|
||||
tal:attributes="
|
||||
href string:${breadcrumb/url}/@@SelectedManagementView.html">
|
||||
breadcrumb item</a> / </tal:block>
|
||||
</div>
|
||||
</metal:slot>
|
||||
|
||||
<div metal:fill-slot="body" i18n:domain="zope"
|
||||
tal:define="groups_info view/getGroupsInfo">
|
||||
<h1 i18n:translate="">Define Workspace Properties</h1>
|
||||
|
@ -54,7 +73,7 @@
|
|||
<h2 i18n:translate="">Assign Permissions to Roles for Children of this Object</h2>
|
||||
<br />
|
||||
<metal:permissions use-macro="view/permission_macros/permission_form" />
|
||||
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -28,6 +28,7 @@ from zope.app.security.settings import Allow, Deny, Unset
|
|||
from zope.cachedescriptors.property import Lazy
|
||||
from zope.interface import implements
|
||||
from zope.lifecycleevent import IObjectCreatedEvent, IObjectModifiedEvent
|
||||
from zope.location.interfaces import IRoot
|
||||
from zope.security import canAccess, canWrite
|
||||
from zope.security import checkPermission as baseCheckPermission
|
||||
from zope.security.management import getInteraction
|
||||
|
@ -219,6 +220,16 @@ class WorkspaceInformation(Persistent):
|
|||
def getParent(self):
|
||||
return self.__parent__
|
||||
|
||||
def getParents(self):
|
||||
parents = []
|
||||
w = self.__parent__
|
||||
while w is not None:
|
||||
parents.append(w)
|
||||
w = w.__parent__
|
||||
if parents and IRoot.providedBy(parents[-1]):
|
||||
return parents
|
||||
raise TypeError("Not enough context information to get all parents")
|
||||
|
||||
|
||||
def getWorkspaceGroup(obj, predicate):
|
||||
wsi = obj.workspaceInformation
|
||||
|
|
Loading…
Add table
Reference in a new issue