Commit a7681659 authored by Jim Fulton's avatar Jim Fulton

The security view now provides a link to manage property

acquisition separately.  This makes it much easier to
quickly enable or disable acquisition for all permissions.
parent a9867a7b
"""Access control support"""
__version__='$Revision: 1.18 $'[11:-2]
__version__='$Revision: 1.19 $'[11:-2]
from Globals import HTMLFile, MessageDialog
......@@ -60,6 +60,20 @@ class RoleManager:
if REQUEST is not None: return self.manage_access(self,REQUEST)
manage_acquiredForm=HTMLFile('acquiredEdit', globals())
def manage_acquiredPermissions(self, permissions=[], REQUEST=None):
"Change the permissions that acquire"
for p in self.__ac_permissions__:
name, value = p[:2]
p=Permission(name,value,self)
roles=p.getRoles()
if roles is None: continue
if name in permissions: p.setRoles(list(roles))
else: p.setRoles(tuple(roles))
if REQUEST is not None: return self.manage_access(self,REQUEST)
manage_permissionForm=HTMLFile('permissionEdit', globals())
def manage_permission(self, permission_to_manage,
roles=[], acquire=0, REQUEST=None):
......
......@@ -27,11 +27,7 @@ indicate where roles are assigned permissions.
<TABLE>
<TR>
<!--#unless isTopLevelPrincipiaApplicationObject-->
<TD>
<STRONG>
Acquire<BR>permission<BR>settings?
</STRONG>
</TD>
<TD></TD>
<!--#/unless-->
<TD>
<STRONG>
......@@ -46,7 +42,11 @@ indicate where roles are assigned permissions.
</TR>
<TR>
<!--#unless isTopLevelPrincipiaApplicationObject-->
<TD></TD>
<TD>
<STRONG>
<a href="manage_acquiredForm">Acquire<BR>permission<BR>settings</a>?
</STRONG>
</TD>
<!--#/unless-->
<TD></TD>
<!--#in valid_roles-->
......
<html><head><title>Manage Acquired Permission Settings</title></head>
<BODY BGCOLOR="#FFFFFF" LINK="#000099" VLINK="#555555" ALINK="#77003B">
<!--#if manage_tabs--><!--#var manage_tabs--><!--#/if manage_tabs-->
<FORM ACTION="manage_acquiredPermissions" METHOD="POST">
Select permissions that acquire permission settings:<br>
<select name=permissions:list multiple size=10>
<!--#in permission_settings mapping-->
<option <!--#if acquire-->SELECTED<!--#/if-->><!--#var name--></option>
<!--#/in-->
</select><p>
<input type=submit value="Change">
</form></body></html>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment