[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/Security/pt - manage_access.pt:1.2 manage_permissionForm.pt:1.2 manage_roleForm.pt:1.2 principal_permission_edit.pt:1.2 principal_role_association.pt:1.2
Jim Fulton
jim@zope.com
Mon, 10 Jun 2002 19:28:48 -0400
Update of /cvs-repository/Zope3/lib/python/Zope/App/Security/pt
In directory cvs.zope.org:/tmp/cvs-serv17445/lib/python/Zope/App/Security/pt
Added Files:
manage_access.pt manage_permissionForm.pt manage_roleForm.pt
principal_permission_edit.pt principal_role_association.pt
Log Message:
Merged Zope-3x-branch into newly forked Zope3 CVS Tree.
=== Zope3/lib/python/Zope/App/Security/pt/manage_access.pt 1.1 => 1.2 ===
+<head>
+<style metal:fill-slot="headers" type="text/css">
+<!--
+
+h1 {
+ font-family: Verdana, Helvetica, sans-serif;
+ font-size: 24pt;
+ font-weight: bold;
+}
+
+h2 {
+ font-family: Verdana, Helvetica, sans-serif;
+ font-size: 18pt;
+ font-weight: bold;
+}
+
+h3 {
+ font-family: Verdana, Helvetica, sans-serif;
+ font-size: 14pt;
+ font-weight: bold;
+}
+
+a:hover {
+ font-family: Verdana, Helvetica, sans-serif;
+ text-decoration: underline;
+ color: #333333;
+}
+
+a:link {
+ font-family: Verdana, Helvetica, sans-serif;
+ text-decoration: none;
+ color: #000099;
+}
+
+a {
+ font-family: Verdana, Helvetica, sans-serif;
+ text-decoration: none;
+ color: #000099;
+}
+
+a.strong-link {
+ font-family: Verdana, Helvetica, sans-serif;
+ text-decoration: underline;
+ color: #000099;
+}
+
+p {
+ font-family: Verdana, Helvetica, sans-serif;
+ font-size: 10pt;
+ color: #333333;
+}
+
+th {
+ font-family: Verdana, Helvetica, sans-serif;
+ font-weight: bold;
+ font-size: 10pt;
+ color: #333333;
+}
+
+.form-help {
+ font-family: Verdana, Helvetica, sans-serif;
+ font-size: 10pt;
+ color: #333333;
+}
+
+.std-text {
+ font-family: Verdana, Helvetica, sans-serif;
+ font-size: 10pt;
+ color: #333333;
+}
+
+.tab-small {
+ font-family: Verdana, Helvetica, sans-serif;
+ font-size: 8pt;
+ color: #333333;
+}
+
+.location-bar {
+ background-color: #efefef;
+ border: none;
+}
+
+.strong-header {
+ font-family: Verdana, Helvetica, sans-serif;
+ font-size: 12pt;
+ font-weight: bold;
+ background-color: #000000;
+ color: #ffffff;
+}
+
+.list-header {
+ background-color: #c0c0c0;
+ border: none;
+}
+
+.list-item {
+ font-family: Verdana, Helvetica, sans-serif;
+ font-size: 10pt;
+}
+
+.list-nav {
+ font-family: Verdana, Helvetica, sans-serif;
+ font-size: 10pt;
+ font-weight: bold;
+}
+
+.row-normal {
+ background-color: #ffffff;
+ border: none;
+
+}
+
+.row-hilite {
+ background-color: #efefef;
+ border: none;
+}
+
+.section-bar {
+ background-color: #c0c0c0;
+ border: none;
+}
+
+.system-msg {
+ font-family: Verdana, Helvetica, sans-serif;
+ font-size: 10pt;
+ background-color: #ffffff;
+ border: 1px solid #000000;
+ margin-bottom: 6px;
+ margin-top: 6px;
+ padding: 4px;
+ width: 100%;
+ color: #660033;
+}
+
+.form-title {
+ font-family: Verdana, Helvetica, sans-serif;
+ font-weight: bold;
+ font-size: 12pt;
+ color: #333333;
+}
+
+.form-label {
+ font-family: Verdana, Helvetica, sans-serif;
+ font-weight: bold;
+ font-size: 10pt;
+ color: #333333;
+}
+
+.form-optional {
+ font-family: Verdana, Helvetica, sans-serif;
+ font-weight: bold;
+ font-style: italic;
+ font-size: 10pt;
+ color: #333333;
+}
+
+.form-element {
+ font-family: Verdana, Helvetica, aans-serif;
+ font-size: 10pt;
+ color: #000000;
+}
+
+.form-text {
+ font-family: Verdana, Helvetica, sans-serif;
+ font-size: 10pt;
+ color: #333333;
+}
+
+.form-mono {
+ font-family: monospace;
+ font-size: 12px;
+ text-decoration: none;
+}
+
+-->
+</style>
+
+</head>
+<body bgcolor="#ffffff" link="#000099" alink="#000099" vlink="#000099">
+<div metal:fill-slot="body">
+<p class="form-help">
+a helpful message
+</p>
+
+<p class="form-help">
+another helpful message
+</p>
+
+<form action="action.html" method="post">
+
+<table width="100%" cellspacing="0" cellpadding="2" border="0" nowrap>
+<tr class="list-header">
+ <td align="left" valign="top">
+ <div class="form-label">
+ <strong>Permission</strong>
+ </div>
+ </td>
+ <td align="left">
+ <div class="form-label">
+ <strong>Roles</strong>
+ </div>
+ </td>
+</tr>
+
+<tr class="row-normal">
+ <td></td>
+ <td align="center" tal:repeat="role view/roles">
+ <div class="list-item">
+ <a href="manage_roleForm.pt"
+ tal:attributes="
+ href string:manage_roleForm?role_to_manage=${role/getId}"
+ tal:content="role/getTitle">Anonymous</a>
+ <input type="hidden" name="r0" value=""
+ tal:attributes="
+ name string:r${repeat/role/index};
+ value string:${role/getId}">
+
+ </div>
+ </td>
+</tr>
+
+<tbody tal:repeat="perm view/permissionRoles">
+<tr class="row-hilite"
+ tal:condition="repeat/perm/odd"
+ >
+ <td align="left" nowrap>
+ <div class="list-item">
+ <a
+ href="manage_permissionForm.pt"
+ tal:attributes="
+ href string:manage_permissionForm?permission_to_manage=${perm/getId}"
+ tal:content="perm/getTitle"
+ >Access Transient Objects</a>
+ <input type="hidden" name="r0" value=""
+ tal:attributes="
+ name string:p${repeat/perm/index};
+ value string:${perm/getId}">
+ </div>
+ </td>
+ <td align="center" tal:repeat="role perm/roles">
+ <input type="checkbox" name="p0r0"
+ tal:attributes="
+ CHECKED role;
+ name string:p${repeat/perm/index}r${repeat/role/index}"
+ />
+ </td>
+</tr>
+<tr class="row-normal"
+ tal:condition="repeat/perm/even"
+ >
+ <td align="left" nowrap>
+ <div class="list-item">
+ <a
+ href="manage_permissionForm.pt"
+ tal:attributes="
+ href string:manage_permissionForm?permission_to_manage=${perm/getId}"
+ tal:content="perm/getTitle"
+ >Access Transient Objects</a>
+ <input type="hidden" name="r0" value=""
+ tal:attributes="
+ name string:p${repeat/perm/index};
+ value string:${perm/getId}">
+ </div>
+ </td>
+ <td align="center" tal:repeat="role perm/roles">
+ <input type="checkbox" name="p0r0"
+ tal:attributes="
+ CHECKED role;
+ name string:p${repeat/perm/index}r${repeat/role/index}"
+ />
+ </td>
+</tr>
+</tbody>
+
+<tr>
+<td colspan="5" align="left">
+<div class="form-element">
+<input class="form-element" type="submit" name="submit" value="Save Changes" />
+<div tal:replace="options/message|nothing" />
+</div>
+</td>
+</tr>
+</table>
+</form>
+</div>
+</body>
+</html>
+
+
=== Zope3/lib/python/Zope/App/Security/pt/manage_permissionForm.pt 1.1 => 1.2 ===
+<head>
+<style metal:fill-slot="headers" type="text/css" ></style>
+</head>
+<body bgcolor="#ffffff" link="#000099" alink="#000099" vlink="#000099">
+<div metal:fill-slot="body">
+<p class="form-help">
+Helpful message.
+</p>
+
+<div tal:define="perm python:view.permissionForID(request.get('permission_to_manage'))">
+<p class="form-text">
+Roles assigned to the permission
+<strong tal:content="perm/getTitle">Change DTML Methods</strong>
+(id: <strong tal:content="perm/getId">Zope.Some.Permission</strong>)
+</p>
+
+
+<form action="update_permission" method="post">
+<input type="hidden" name="permission_id" value="Permission Name"
+ tal:attributes="value perm/getId" />
+<div class="form-element">
+<select name="roles:list" multiple size="10">
+<option tal:repeat="role perm/rolesInfo"
+ tal:content="role/title"
+ tal:attributes="selected role/checked;
+ value role/id"
+ >Sample</option>
+</select>
+</div>
+
+<div class="form-element">
+<input class="form-element" type="submit" name="submit" value="Save Changes" />
+</div>
+</form>
+
+</div>
+</div>
+</body>
+</html>
=== Zope3/lib/python/Zope/App/Security/pt/manage_roleForm.pt 1.1 => 1.2 ===
+<head>
+<style metal:fill-slot="headers" type="text/css" ></style>
+</head>
+<body bgcolor="#ffffff" link="#000099" alink="#000099" vlink="#000099">
+<div metal:fill-slot="body">
+<p class="form-help">
+Helpful message explaing about how to set specific roles
+</p>
+
+<div tal:define="role python:view.roleForID(request.get('role_to_manage'))" tal:omit-tag="">
+<p class="form-text">
+Permissions assigned to the role
+<strong tal:content="role/getTitle">Great Master Guru</strong>
+(id: <strong tal:content="role/getId">Zope.Some.Role</strong>)
+</p>
+
+
+<form action="update_role" method="get">
+<input type="hidden" name="role_id" value="Role ID"
+ tal:attributes="value role/getId" />
+<div class="form-element">
+<select name="permissions:list" multiple size="20">
+<option tal:repeat="permission role/permissionsInfo"
+ tal:content="permission/title"
+ tal:attributes="selected permission/checked;
+ value permission/id"
+ >Sample Permission</option>
+</select>
+</div>
+
+<div class="form-element">
+<input class="form-element" type="submit" name="submit" value="Save Changes" />
+</div>
+</form>
+
+</div>
+</div>
+</body>
+</html>
=== Zope3/lib/python/Zope/App/Security/pt/principal_permission_edit.pt 1.1 => 1.2 ===
+<div metal:fill-slot="body" tal:define="rprincipal_id python:request['principal_id']">
+<h1>Permission settings for <span tal:replace="python:view.get_principal(rprincipal_id).getTitle()">PrincipalName</span></h1>
+
+<form action="unsetPermissions.html" method="post">
+<h2>Permission Settings</h2>
+<table>
+ <tr>
+ <td valign="top">
+ <table border="0">
+ <tr>
+ <th colspan="2" align="center">Allowed Permissions</th>
+ </tr>
+ <tr tal:repeat="perm python:view.get_set_permissions_for_principal(rprincipal_id, 'Allow')">
+ <td><input type="checkbox" tal:attributes="name perm/getId"></td><td tal:content="perm/getTitle">Permission1</td>
+ </tr>
+ <tr tal:replace="nothing">
+ <td><input type="checkbox" name="permission_ids"></td><td>Permission2</td>
+ </tr>
+ <tr tal:replace="nothing">
+ <td><input type="checkbox" name="permission_ids"></td><td>Permission3</td>
+ </tr>
+ <tr tal:replace="nothing">
+ <td><input type="checkbox" name="permission_ids"></td><td>Permission5</td>
+ </tr>
+ </table>
+ </td>
+ <td valign="top">
+ <table border="0">
+ <tr >
+ <th colspan="2" align="center">Denied Permissions</th>
+ </tr>
+ <tr tal:repeat="perm python:view.get_set_permissions_for_principal(rprincipal_id, 'Deny')">
+ <td><input type="checkbox" tal:attributes="name perm/getId"></td><td tal:content="perm/getTitle">Permission1</td>
+ </tr>
+ <tr tal:replace="nothing">
+ <td><input type="checkbox" name="permission_ids"></td><td>Permission2</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2" align="center"><input type="submit" name="unset" value="Remove selected permission settings"></td></tr>
+</table>
+</form>
+<p> </p>
+<form action="./" method="post">
+<h2>Add permission settings</h2>
+ <table>
+ <tr>
+ <td>
+ <select name="permissions" multiple>
+ <option
+ tal:repeat="perm python:view.get_unset_permissions_for_principal(rprincipal_id)"
+ tal:attributes="value perm/getId"
+ tal:content="perm/getTitle">Perm1</option>
+ <option tal:replace="nothing">Perm2</option>
+ <option tal:replace="nothing">Perm3</option>
+ <option tal:replace="nothing">Perm4</option>
+ <option tal:replace="nothing">Perm5</option>
+ </select>
+ </td>
+ <td valign="center">
+ <p>
+ <input type="submit" name="grantPermissions.html:method" value="Grant">
+ </p>
+ <p>
+ <input type="submit" name="denyPermissions.html:method" value="Deny">
+ </p>
+ </td>
+ </tr>
+ </table>
+</form>
+</div>
+</html>
=== Zope3/lib/python/Zope/App/Security/pt/principal_role_association.pt 1.1 => 1.2 ===
+ <head>
+ <style metal:fill-slot="headers" type="text/css"> </style>
+ </head>
+ <body metal:fill-slot="main" tal:define="hasFilter python:request.get('Filter', None)">
+ <div tal:condition="not: hasFilter">
+ <span class="message"> Apply filter </span>
+ <form method="POST" action="" tal:attributes="action template/getId">
+ <span tal:define="principals view/getAllPrincipals">
+ Principal(s):
+ <select name="principals:list" multiple>
+ <option tal:repeat="principal principals" tal:attributes="value principal/getId" tal:content="principal/getTitle">my title</option>
+ </select>
+ </span>
+
+ <span tal:define="roles view/getAllRoles">
+ Role(s):
+ <select name="roles:list" multiple>
+ <option tal:repeat="role roles" tal:attributes="value role/getId" tal:content="role/getTitle">my title</option>
+ </select>
+ </span>
+
+ <input type="submit" name="Filter" value="Filter" />
+ </form>
+
+ </div>
+ <!-- WANRING!! SELF POSTING FORM!! -->
+
+ <div tal:condition="hasFilter">
+ <div class="principalRolesGrid"
+ tal:define="principalRoleGrid python:view.createGrid( request.get('roles', None), request.get('principals', None)); " >
+
+ <span tal:define="global listPrincipals principalRoleGrid/principals;
+ global listRoles principalRoleGrid/roles;
+ global listValues principalRoleGrid/listAvailabaleValues" />
+
+ <form method="POST" action="apply">
+ <table>
+ <tr class="roleHeading">
+ <td class="principal">
+
+ </td>
+ <td class="role" tal:repeat="role listRoles" tal:content="role/getId">
+ role id
+ </td>
+ </tr>
+
+ <tr class="principalRoleRow" tal:repeat="principal listPrincipals">
+ <td class="principalLabel" tal:content="principal/getId">
+ Principal Id
+ </td>
+
+ <td class="principalRole" tal:repeat="role listRoles">
+ <select name="mapping.principal.row"
+ tal:attributes="name string:grid.${principal/getId}.${role/getId}:records"
+ tal:define="selectedValue python:1 or principalRoleGrid.grid(principal, role)" >
+ <option value="" tal:repeat="defaultValue listValues"
+ tal:attributes="selected python:test(defaultValue==selectedValue, 'selected', '');
+ value defaultValue;"
+ tal:content="defaultValue">
+
+ </option>
+ </select>
+ </td>
+ </tr>
+
+ </table>
+ <input type="submit" name="apply" value="apply" />
+ </form>
+
+ </div>
+ </div>
+
+ </body>
+</html>