Commit 93bf1a66 authored by Chris McDonough's avatar Chris McDonough

Changed manage_access to work properly, and converted RoleManager's...

Changed manage_access to work properly, and converted RoleManager's manage_access to use DTMLFile instead of HTMLFile.
parent 3671b2aa
...@@ -84,10 +84,10 @@ ...@@ -84,10 +84,10 @@
############################################################################## ##############################################################################
"""Access control support""" """Access control support"""
__version__='$Revision: 1.44 $'[11:-2] __version__='$Revision: 1.45 $'[11:-2]
from Globals import HTMLFile, DTMLFile, MessageDialog, Dictionary from Globals import DTMLFile, MessageDialog, Dictionary
from string import join, strip, split, find from string import join, strip, split, find
from Acquisition import Implicit, Acquired, aq_get from Acquisition import Implicit, Acquired, aq_get
import Globals, ExtensionClass, PermissionMapping, Products import Globals, ExtensionClass, PermissionMapping, Products
...@@ -245,18 +245,17 @@ class RoleManager(ExtensionClass.Base, PermissionMapping.RoleManager): ...@@ -245,18 +245,17 @@ class RoleManager(ExtensionClass.Base, PermissionMapping.RoleManager):
raise 'Invalid Permission', ( raise 'Invalid Permission', (
"The permission <em>%s</em> is invalid." % permission_to_manage) "The permission <em>%s</em> is invalid." % permission_to_manage)
_normal_manage_access=DTMLFile('dtml/access', globals())
_method_manage_access=DTMLFile('dtml/methodAccess', globals())
def manage_access( def manage_access(self, REQUEST, **kw):
trueself, self, REQUEST,
_normal_manage_access=HTMLFile('dtml/access', globals()),
_method_manage_access=HTMLFile('dtml/methodAccess', globals()),
**kw):
"Return an interface for making permissions settings" "Return an interface for making permissions settings"
if hasattr(self, '_isBeingUsedAsAMethod') and \ if hasattr(self, '_isBeingUsedAsAMethod') and \
self._isBeingUsedAsAMethod(): self._isBeingUsedAsAMethod():
return apply(_method_manage_access,(trueself, self, REQUEST), kw) return apply(self._method_manage_access,(), kw)
else: else:
return apply(_normal_manage_access,(trueself, self, REQUEST), kw) return apply(self._normal_manage_access,(), kw)
def manage_changePermissions(self, REQUEST): def manage_changePermissions(self, REQUEST):
"Change all permissions settings, called by management screen" "Change all permissions settings, called by management screen"
......
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