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
23ac3cc5
Commit
23ac3cc5
authored
Nov 14, 2003
by
Tres Seaver
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- AccessControl.User used a misleading string exeception,
'NotImplemented', which shadowed the Python builtin.
parent
3be3be21
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
16 deletions
+19
-16
doc/CHANGES.txt
doc/CHANGES.txt
+4
-0
lib/python/AccessControl/User.py
lib/python/AccessControl/User.py
+15
-16
No files found.
doc/CHANGES.txt
View file @
23ac3cc5
...
...
@@ -33,6 +33,10 @@ Zope Changes
(such as storages, databases, or logging handlers) to be used.
Bugs fixed
- AccessControl.User used a misleading string exeception,
'NotImplemented', which shadowed the Python builtin.
- Collector #426: Inconsistent, undocumented error() method.
- Collector #799: Eliminate improper uses of SCRIPT_NAME.
...
...
lib/python/AccessControl/User.py
View file @
23ac3cc5
...
...
@@ -12,7 +12,7 @@
##############################################################################
"""Access control package"""
__version__
=
'$Revision: 1.1
79
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.1
80
$'
[
11
:
-
2
]
import
Globals
,
socket
,
SpecialUsers
,
re
import
os
...
...
@@ -32,7 +32,6 @@ from AccessControl.SecurityManagement import noSecurityManager
from
AccessControl.ZopeSecurityPolicy
import
_noroles
ListType
=
type
([])
NotImplemented
=
'NotImplemented'
_marker
=
[]
...
...
@@ -61,11 +60,11 @@ class BasicUser(Implicit):
return
1
def
__init__
(
self
,
name
,
password
,
roles
,
domains
):
raise
NotImplemented
raise
NotImplemented
Error
def
getUserName
(
self
):
"""Return the username of a user"""
raise
NotImplemented
raise
NotImplemented
Error
def
getId
(
self
):
"""Get the ID of the user. The ID can be used, at least from
...
...
@@ -75,11 +74,11 @@ class BasicUser(Implicit):
def
_getPassword
(
self
):
"""Return the password of the user."""
raise
NotImplemented
raise
NotImplemented
Error
def
getRoles
(
self
):
"""Return the list of roles assigned to a user."""
raise
NotImplemented
raise
NotImplemented
Error
def
getRolesInContext
(
self
,
object
):
"""Return the list of roles assigned to the user,
...
...
@@ -112,7 +111,7 @@ class BasicUser(Implicit):
def
getDomains
(
self
):
"""Return the list of domain restrictions for a user"""
raise
NotImplemented
raise
NotImplemented
Error
# ------------------------------
# Internal User object interface
...
...
@@ -479,15 +478,15 @@ class BasicUserFolder(Implicit, Persistent, Navigation, Tabs, RoleManager,
def
getUserNames
(
self
):
"""Return a list of usernames"""
raise
NotImplemented
raise
NotImplemented
Error
def
getUsers
(
self
):
"""Return a list of user objects"""
raise
NotImplemented
raise
NotImplemented
Error
def
getUser
(
self
,
name
):
"""Return the named user object or None"""
raise
NotImplemented
raise
NotImplemented
Error
def
getUserById
(
self
,
id
,
default
=
_marker
):
"""Return the user corresponding to the given id.
...
...
@@ -505,19 +504,19 @@ class BasicUserFolder(Implicit, Persistent, Navigation, Tabs, RoleManager,
do the actual adding of a user. The 'password' will be the
original input password, unencrypted. The implementation of this
method is responsible for performing any needed encryption."""
raise
NotImplemented
raise
NotImplemented
Error
def
_doChangeUser
(
self
,
name
,
password
,
roles
,
domains
,
**
kw
):
"""Modify an existing user. This should be implemented by subclasses
to make the actual changes to a user. The 'password' will be the
original input password, unencrypted. The implementation of this
method is responsible for performing any needed encryption."""
raise
NotImplemented
raise
NotImplemented
Error
def
_doDelUsers
(
self
,
names
):
"""Delete one or more users. This should be implemented by subclasses
to do the actual deleting of users."""
raise
NotImplemented
raise
NotImplemented
Error
# As of Zope 2.5, userFolderAddUser, userFolderEditUser and
# userFolderDelUsers offer aliases for the the _doAddUser, _doChangeUser
...
...
@@ -534,7 +533,7 @@ class BasicUserFolder(Implicit, Persistent, Navigation, Tabs, RoleManager,
objects."""
if
hasattr
(
self
,
'_doAddUser'
):
return
self
.
_doAddUser
(
name
,
password
,
roles
,
domains
,
**
kw
)
raise
NotImplemented
raise
NotImplemented
Error
def
userFolderEditUser
(
self
,
name
,
password
,
roles
,
domains
,
**
kw
):
"""API method for changing user object attributes. Note that not
...
...
@@ -542,14 +541,14 @@ class BasicUserFolder(Implicit, Persistent, Navigation, Tabs, RoleManager,
attributes."""
if
hasattr
(
self
,
'_doChangeUser'
):
return
self
.
_doChangeUser
(
name
,
password
,
roles
,
domains
,
**
kw
)
raise
NotImplemented
raise
NotImplemented
Error
def
userFolderDelUsers
(
self
,
names
):
"""API method for deleting one or more user objects. Note that not
all user folder implementations support deletion of user objects."""
if
hasattr
(
self
,
'_doDelUsers'
):
return
self
.
_doDelUsers
(
names
)
raise
NotImplemented
raise
NotImplemented
Error
# -----------------------------------
...
...
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