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
f1a05d49
Commit
f1a05d49
authored
May 07, 1999
by
Ken Manheimer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
RoleManager.manage_addLocalRoles(): Don't add in duplicates of
existing local roles.
parent
987397ce
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
lib/python/AccessControl/Role.py
lib/python/AccessControl/Role.py
+6
-2
No files found.
lib/python/AccessControl/Role.py
View file @
f1a05d49
...
@@ -84,7 +84,7 @@
...
@@ -84,7 +84,7 @@
##############################################################################
##############################################################################
"""Access control support"""
"""Access control support"""
__version__
=
'$Revision: 1.3
0
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.3
1
$'
[
11
:
-
2
]
from
Globals
import
HTMLFile
,
MessageDialog
,
Dictionary
from
Globals
import
HTMLFile
,
MessageDialog
,
Dictionary
...
@@ -336,7 +336,11 @@ class RoleManager(ExtensionClass.Base):
...
@@ -336,7 +336,11 @@ class RoleManager(ExtensionClass.Base):
if
not
self
.
validate_roles
(
roles
):
if
not
self
.
validate_roles
(
roles
):
raise
ValueError
,
'Invalid role given.'
raise
ValueError
,
'Invalid role given.'
dict
=
self
.
__ac_local_roles__
or
{}
dict
=
self
.
__ac_local_roles__
or
{}
dict
[
userid
]
=
dict
[
userid
]
+
roles
local_roles
=
dict
.
get
(
userid
,
[])
for
r
in
roles
:
if
r
not
in
local_roles
:
local_roles
.
append
(
r
)
dict
[
userid
]
=
local_roles
self
.
__ac_local_roles__
=
dict
self
.
__ac_local_roles__
=
dict
if
REQUEST
is
not
None
:
if
REQUEST
is
not
None
:
stat
=
'Your changes have been saved.'
stat
=
'Your changes have been saved.'
...
...
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