Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
dde90b26
Commit
dde90b26
authored
Sep 04, 2001
by
Amos Latteier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated the User API, as per Brian Lloyd's request
parent
4ffa7ebb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
23 deletions
+24
-23
lib/python/Products/OFSP/help/AuthenticatedUser.py
lib/python/Products/OFSP/help/AuthenticatedUser.py
+24
-23
No files found.
lib/python/Products/OFSP/help/AuthenticatedUser.py
View file @
dde90b26
...
...
@@ -88,55 +88,56 @@ class AuthenticatedUser:
This interface needs to be supported by objects that
are returned by user validation and used for access control.
"""
def
getUserName
():
"""
Return the name of a user
Permission -- Always available
"""
def
has
Role
(
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
get
Id
():
def
get
Roles
():
"""
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
"""
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment