Commit f2f140e2 authored by Evan Simpson's avatar Evan Simpson

Changed object* methods to declareObject* and updated docstrings.

parent 1142f28b
...@@ -163,19 +163,19 @@ class SecurityInfo(Acquisition.Implicit): ...@@ -163,19 +163,19 @@ class SecurityInfo(Acquisition.Implicit):
"""Declare names to be associated with a permission.""" """Declare names to be associated with a permission."""
self._setaccess(names, permission_name) self._setaccess(names, permission_name)
objectPublic__roles__=ACCESS_PRIVATE declareObjectPublic__roles__=ACCESS_PRIVATE
def objectPublic(self): def declareObjectPublic(self):
"""Declare names to be publicly accessible.""" """Declare the object to be publicly accessible."""
self._setaccess((), ACCESS_PUBLIC) self._setaccess((), ACCESS_PUBLIC)
objectPrivate__roles__=ACCESS_PRIVATE declareObjectPrivate__roles__=ACCESS_PRIVATE
def objectPrivate(self): def declareObjectPrivate(self):
"""Declare names to be inaccessible to restricted code.""" """Declare the object to be inaccessible to restricted code."""
self._setaccess((), ACCESS_PRIVATE) self._setaccess((), ACCESS_PRIVATE)
objectProtected__roles__=ACCESS_PRIVATE declareObjectProtected__roles__=ACCESS_PRIVATE
def objectProtected(self, permission_name): def declareObjectProtected(self, permission_name):
"""Declare names to be associated with a permission.""" """Declare the object to be associated with a permission."""
self._setaccess((), permission_name) self._setaccess((), permission_name)
setDefaultRoles__roles__=ACCESS_PRIVATE setDefaultRoles__roles__=ACCESS_PRIVATE
...@@ -313,6 +313,11 @@ class ModuleSecurityInfo(SecurityInfo): ...@@ -313,6 +313,11 @@ class ModuleSecurityInfo(SecurityInfo):
"""Cannot declare module names protected.""" """Cannot declare module names protected."""
pass pass
declareObjectProtected__roles__=ACCESS_PRIVATE
def declareObjectProtected(self, permission_name):
"""Cannot declare module protected."""
pass
setDefaultRoles__roles__=ACCESS_PRIVATE setDefaultRoles__roles__=ACCESS_PRIVATE
def setDefaultRoles(self, permission_name, roles): def setDefaultRoles(self, permission_name, roles):
"""Cannot set default roles for permissions in a module.""" """Cannot set default roles for permissions in a module."""
......
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