loops/security/browser/manage_permissionform.pt
helmutm c2ccc9fdb5 create separate browser package for security-related views; provide first end-user view: Role Permissions by Type
git-svn-id: svn://svn.cy55.de/Zope3/src/loops/trunk@4072 fd906abe-77d9-0310-91a1-e0d9ade77398
2010-11-13 09:19:29 +00:00

99 lines
3.7 KiB
XML

<html metal:use-macro="context/@@standard_macros/view"
i18n:domain="zope">
<body>
<div metal:fill-slot="body">
<h2 i18n:translate="">Assign Permissions to Roles</h2>
<p tal:define="status view/update"
tal:content="status" i18n:translate="" />
<div metal:define-macro="permission_form"
tal:define="permId view/permissionId;
perm view/permission;">
<form>
<select name="permission_to_manage"
onChange="submit()">
<option tal:repeat="pId view/getPermissions"
tal:attributes="value pId;
selected python: pId == permId"
tal:content="pId" />
</select>
<input type="submit" name="select_permission"
i18n:attributes="value"
value="Select Permission" />
</form>
<p class="form-text" i18n:translate="">
Roles assigned to the permission
<strong tal:content="perm/title"
i18n:name="perm_title" i18n:translate="">Change DTML Methods</strong>
(id: <strong tal:content="permId"
i18n:name="perm_id">Zope.Some.Permission</strong>)
</p>
<form method="post">
<input type="hidden" name="permission_to_manage" value="Permission Name"
tal:attributes="value permId" />
<input type="hidden" name="permission_id" value="Permission Name"
tal:attributes="value permId" />
<div class="form-element">
<table class="listing" cellspacing="0" cellpadding="2" border="0"
nowrap="nowrap">
<tr class="list-header">
<th i18n:translate="">Role</th>
<th i18n:translate="">Users/Groups</th>
<th i18n:translate="">Acquired Setting</th>
<th i18n:translate="">Setting</th>
</tr>
<tal:role tal:repeat="setting perm/roleSettings">
<tr class="row-normal"
tal:define="ir repeat/setting/index;
roleId python:path('view/roles')[ir].id"
tal:attributes="style python:view.hideRole(roleId) and
'visibility: collapse' or ''">
<td align="left" valign="top"
tal:content="roleId" />
<td style="white-space: normal">
<span tal:define="users python: view.listUsersForRole(roleId)"
tal:replace="structure users" /></td>
<td class="center">
<span tal:replace="python:
view.getAcquiredPermissionSetting(roleId, permId)" />
</td>
<td class="center">
<select name="settings:list">
<option value="Unset"
tal:repeat="option view/availableSettings"
tal:attributes="value option/id;
selected python:setting == option['id']"
tal:content="option/shorttitle"
i18n:translate="">+</option>
</select>
</td>
</tr>
</tal:role>
<tr tal:define="principals view/getPrincipalPermissions"
tal:condition="principals">
<td>
<strong i18n:translate="">Direct Settings</strong>
</td>
<td tal:content="structure principals">+xyz</td>
<td /><td />
</tr>
</table>
</div>
<br />
<div class="form-element">
<input class="form-element" type="submit" name="SUBMIT_PERMS"
value="Save Changes" i18n:attributes="value save-changes-button"/>
</div>
</form>
</div>
</div>
</body>
</html>