[Zope-Checkins] CVS: Zope/lib/python/Products/OFSP/help - AuthenticatedUser.py:1.5
Amos Latteier
amos@zope.com
Tue, 4 Sep 2001 13:49:06 -0400
Update of /cvs-repository/Zope/lib/python/Products/OFSP/help
In directory cvs.zope.org:/tmp/cvs-serv25693
Modified Files:
AuthenticatedUser.py
Log Message:
updated the User API, as per Brian Lloyd's request
=== Zope/lib/python/Products/OFSP/help/AuthenticatedUser.py 1.4 => 1.5 ===
are returned by user validation and used for access control.
"""
-
def getUserName():
"""
-
Return the name of a user
Permission -- Always available
-
"""
- def hasRole(object, roles):
+ def has_role(roles, object=None):
"""
-
- Return a value that is true if the user has the given roles on
- the given object and return false otherwise.
+ Return true if the user has at least one role from a list of
+ roles, optionally in the context of an object.
Permission -- Always available
-
"""
- def getRoles(object):
+ def has_permission(permission, object):
"""
-
- Returns a list of the roles the user has on the given object
- (in the current context?)
+ Return true if the user has a permission on an object.
Permission -- Always available
-
"""
- def getId():
+ def getRoles():
"""
+ Return a list of the user's roles.
- Get the ID of the user. The ID can be used, at least from
- Python, to get the user from the user's UserDatabase.
-
- Permission -- Python only
+ Permission -- Always available
+ """
+ def getRolesInContext(object):
"""
+ Return the list of roles assigned to the user, including local
+ roles assigned in context of an object.
- def getDatabasePath():
+ Permission -- Always available
"""
- Get a physical path to the user's UserDatabase. A Traversal
- facility can be used to get the user database from the path
- returned by this method.
+ def getId():
+ """
+ Get the ID of the user. The ID can be used from
+ Python to get the user from the user's UserDatabase.
- Permission -- Python only
+ Permission -- Always available
+ """
+ def getDomains():
+ """
+ Return the list of domain restrictions for a user.
+
+ Permission -- Always available
"""