Commit dde90b26 authored by Amos Latteier's avatar Amos Latteier

updated the User API, as per Brian Lloyd's request

parent 4ffa7ebb
......@@ -89,54 +89,55 @@ class AuthenticatedUser:
are returned by user validation and used for access control.
"""
def getUserName():
"""
Return the name of a user
Permission -- Always available
"""
def has_role(roles, object=None):
"""
Return true if the user has at least one role from a list of
roles, optionally in the context of an object.
def hasRole(object, roles):
Permission -- Always available
"""
Return a value that is true if the user has the given roles on
the given object and return false otherwise.
def has_permission(permission, object):
"""
Return true if the user has a permission on an object.
Permission -- Always available
"""
def getRoles():
"""
Return a list of the user's roles.
def getRoles(object):
Permission -- Always available
"""
Returns a list of the roles the user has on the given object
(in the current context?)
def getRolesInContext(object):
"""
Return the list of roles assigned to the user, including local
roles assigned in context of an object.
Permission -- Always available
"""
def getId():
"""
Get the ID of the user. The ID can be used from
Python to get the user from the user's UserDatabase.
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 getDatabasePath():
def getDomains():
"""
Return the list of domain restrictions for a user.
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.
Permission -- Python only
Permission -- Always available
"""
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