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
191a9d60
Commit
191a9d60
authored
Jan 02, 1998
by
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed evil acquisition bug.
parent
8ec25c36
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
3 deletions
+11
-3
lib/python/AccessControl/Role.py
lib/python/AccessControl/Role.py
+11
-3
No files found.
lib/python/AccessControl/Role.py
View file @
191a9d60
"""Access control support"""
__version__
=
'$Revision: 1.
9
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.
10
$'
[
11
:
-
2
]
from
Globals
import
HTMLFile
,
MessageDialog
...
...
@@ -353,6 +353,8 @@ class Permission:
def
__init__
(
self
,
name
,
data
,
obj
):
self
.
name
=
name
self
.
data
=
data
if
hasattr
(
obj
,
'aq_self'
):
obj
=
obj
.
aq_self
self
.
obj
=
obj
def
getRoles
(
self
):
...
...
@@ -411,7 +413,11 @@ class Permission:
if
role
in
data
:
data
.
remove
(
role
)
if
data
:
attr
.
__roles__
=
data
else
:
del
attr
.
__roles__
else
:
# The hasattr above will find __roles__ defined
# in the class, but we wont be able to delete it.
try
:
del
attr
.
__roles__
except
:
pass
def
__len__
(
self
):
return
1
def
__str__
(
self
):
return
self
.
name
...
...
@@ -427,7 +433,9 @@ class AccessType:
def
__init__
(
self
,
name
,
data
,
obj
):
self
.
name
=
name
self
.
data
=
data
self
.
obj
=
obj
if
hasattr
(
obj
,
'aq_self'
):
obj
=
obj
.
aq_self
self
.
obj
=
obj
def
getRoles
(
self
):
# Return the list of role names which have been given
...
...
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