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
cd556920
Commit
cd556920
authored
Aug 09, 2000
by
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merged mutability fixes from 2.2 branch
parent
8cbf6028
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
10 deletions
+12
-10
lib/python/AccessControl/Role.py
lib/python/AccessControl/Role.py
+9
-7
lib/python/AccessControl/User.py
lib/python/AccessControl/User.py
+3
-3
No files found.
lib/python/AccessControl/Role.py
View file @
cd556920
...
...
@@ -84,7 +84,7 @@
##############################################################################
"""Access control support"""
__version__
=
'$Revision: 1.
39
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.
40
$'
[
11
:
-
2
]
from
Globals
import
HTMLFile
,
MessageDialog
,
Dictionary
...
...
@@ -347,8 +347,9 @@ class RoleManager(ExtensionClass.Base, PermissionMapping.RoleManager):
keys
.
sort
()
info
=
[]
for
key
in
keys
:
info
.
append
((
key
,
dict
[
key
]))
return
info
value
=
tuple
(
dict
[
key
])
info
.
append
((
key
,
value
))
return
tuple
(
info
)
def
get_valid_userids
(
self
):
item
=
self
...
...
@@ -363,11 +364,11 @@ class RoleManager(ExtensionClass.Base, PermissionMapping.RoleManager):
item
=
item
.
aq_parent
keys
=
dict
.
keys
()
keys
.
sort
()
return
keys
return
tuple
(
keys
)
def
get_local_roles_for_userid
(
self
,
userid
):
dict
=
self
.
__ac_local_roles__
or
{}
return
dict
.
get
(
userid
,
[]
)
return
tuple
(
dict
.
get
(
userid
,
[])
)
def
manage_addLocalRoles
(
self
,
userid
,
roles
,
REQUEST
=
None
):
"""Set local roles for a user."""
...
...
@@ -411,6 +412,7 @@ class RoleManager(ExtensionClass.Base, PermissionMapping.RoleManager):
#------------------------------------------------------------
access_debug_info__roles__
=
()
def
access_debug_info
(
self
):
"Return debug info"
clas
=
class_attrs
(
self
)
...
...
@@ -449,7 +451,7 @@ class RoleManager(ExtensionClass.Base, PermissionMapping.RoleManager):
x
=
x
+
1
roles
=
dict
.
keys
()
roles
.
sort
()
return
roles
return
tuple
(
roles
)
def
validate_roles
(
self
,
roles
):
"Return true if all given roles are valid"
...
...
@@ -465,7 +467,7 @@ class RoleManager(ExtensionClass.Base, PermissionMapping.RoleManager):
for
role
in
classattr
(
self
.
__class__
,
'__ac_roles__'
):
try
:
roles
.
remove
(
role
)
except
:
pass
return
roles
return
tuple
(
roles
)
def
manage_defined_roles
(
self
,
submit
=
None
,
REQUEST
=
None
):
...
...
lib/python/AccessControl/User.py
View file @
cd556920
...
...
@@ -84,7 +84,7 @@
##############################################################################
"""Access control package"""
__version__
=
'$Revision: 1.11
3
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.11
4
$'
[
11
:
-
2
]
import
Globals
,
socket
,
regex
,
SpecialUsers
from
Globals
import
HTMLFile
,
MessageDialog
,
Persistent
,
PersistentMapping
...
...
@@ -281,11 +281,11 @@ class SimpleUser(BasicUser):
def
getRoles
(
self
):
"""Return the list of roles assigned to a user."""
return
self
.
roles
return
tuple
(
self
.
roles
)
def
getDomains
(
self
):
"""Return the list of domain restrictions for a user"""
return
self
.
domains
return
tuple
(
self
.
domains
)
class
SpecialUser
(
SimpleUser
):
"""Class for special users, like super and nobody"""
...
...
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