[CMF-checkins] CVS: CMF/DCWorkflow/dtml - state_groups.pt:1.1
workflow_groups.pt:1.1 state_permissions.dtml:1.2
Shane Hathaway
shane at zope.com
Wed Jan 14 17:39:23 EST 2004
Update of /cvs-repository/CMF/DCWorkflow/dtml
In directory cvs.zope.org:/tmp/cvs-serv3094/dtml
Modified Files:
state_permissions.dtml
Added Files:
state_groups.pt workflow_groups.pt
Log Message:
Added a UI for managing group->role mappings using workflow.
This is in addition to DCWorkflow's ability to manage permission->role
mappings. Only the UI is finished so far.
=== Added File CMF/DCWorkflow/dtml/state_groups.pt ===
<h1 tal:replace="structure here/manage_page_header">Header</h1>
<h2 tal:define="manage_tabs_message request/manage_tabs_message | nothing"
tal:replace="structure here/manage_tabs">Tabs</h2>
<p class="form-help">
When objects are in this state, they will take on the group to role
mappings defined below. Only the <a href="../manage_groups">groups
and roles managed by this workflow</a> are shown.
</p>
<form action="setGroups" method="POST"
tal:define="wf here/getWorkflow; roles wf/getRoles">
<table width="100%" cellspacing="0" cellpadding="2" border="0" nowrap>
<tr class="list-header">
<td align="left">
<div class="form-label">
<strong>Group</strong>
</div>
</td>
<td align="left" tal:attributes="colspan python: len(roles)">
<div class="form-label">
<strong>Roles</strong>
</div>
</td>
</tr>
<tr class="row-normal">
<td></td>
<td tal:repeat="role roles" tal:content="role" class="list-item">
Authenticated
</td>
</tr>
<tr tal:repeat="group wf/getGroups" tal:attributes="class
python: repeat['group'].odd and 'row-normal' or 'row-hilite'">
<td tal:content="group/getSecurityMoniker" class="list-item">
(Group) Everyone
</td>
<tal:block tal:define="group_roles python: here.getGroupInfo(group.getId())">
<td tal:repeat="role roles">
<input type="checkbox"
tal:attributes="name python: '%s|%s' % (group.getId(), role);
checked python: role in group_roles" />
</td>
</tal:block>
</tr>
</table>
<input class="form-element" type="submit" name="submit" value="Save Changes" />
</form>
<h1 tal:replace="structure here/manage_page_footer">Footer</h1>
=== Added File CMF/DCWorkflow/dtml/workflow_groups.pt ===
<h1 tal:replace="structure here/manage_page_header">Header</h1>
<h2 tal:define="manage_tabs_message request/manage_tabs_message | nothing"
tal:replace="structure here/manage_tabs">Tabs</h2>
<table>
<tr>
<td width="50%" valign="top">
<form action="." method="POST" tal:attributes="action here/absolute_url"
tal:define="groups here/getGroups">
<h3>Managed Groups</h3>
<div class="form-help">
This workflow controls access by the selected groups. The mappings
from group to role depend on the workflow state.
</div>
<div tal:repeat="group groups">
<input type="checkbox" name="gids:list" tal:attributes="value group/getId" />
<span tal:replace="group/getSecurityMoniker">Everyone</span>
</div>
<div tal:condition="not:groups">
<em>No groups are managed by this workflow.</em>
</div>
<div tal:condition="groups">
<input type="submit" name="delGroups:method" value="Remove" />
</div>
<hr />
<h3>Add a managed group</h3>
<select name="gid">
<option tal:repeat="group here/getAvailableGroups"
tal:attributes="value group/getId" tal:content="group/getSecurityMoniker" />
</select>
<input type="submit" name="addGroup:method" value="Add" />
</form>
</td>
<td width="50%" style="border-left: 1px solid black; padding-left: 1em;"
valign="top">
<form method="POST" tal:attributes="action here/absolute_url">
<h3>Roles Mapped to Groups</h3>
<div class="form-help">
This workflow maps the following roles to groups. Roles not selected
are managed outside this workflow.
<div tal:define="roles here/getRoles"
tal:repeat="role here/getAvailableRoles">
<input type="checkbox" name="roles:list" tal:attributes="value role;
checked python:role in roles" /><span tal:content="role" />
</div>
</div>
<input type="submit" name="setRoles:method" value="Save Changes" />
</form>
</td>
</tr>
</table>
<h1 tal:replace="structure here/manage_page_footer">Footer</h1>
=== CMF/DCWorkflow/dtml/state_permissions.dtml 1.1 => 1.2 ===
--- CMF/DCWorkflow/dtml/state_permissions.dtml:1.1 Mon Jun 11 15:33:47 2001
+++ CMF/DCWorkflow/dtml/state_permissions.dtml Wed Jan 14 17:39:23 2004
@@ -11,7 +11,7 @@
<table width="100%" cellspacing="0" cellpadding="2" border="0" nowrap>
<tr class="list-header">
<td> </td>
- <td align="left" valign="top">
+ <td align="left">
<div class="form-label">
<strong>Permission</strong>
</div>
More information about the CMF-checkins
mailing list