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
fbe06467
Commit
fbe06467
authored
Dec 15, 2000
by
Shane Hathaway
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Corrected local roles computation (Hotfix 2000-12-15)
parent
db311894
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
6 deletions
+9
-6
doc/CHANGES.txt
doc/CHANGES.txt
+2
-0
lib/python/AccessControl/User.py
lib/python/AccessControl/User.py
+7
-6
No files found.
doc/CHANGES.txt
View file @
fbe06467
...
@@ -37,6 +37,8 @@ Zope changes
...
@@ -37,6 +37,8 @@ Zope changes
won't work. This was reported by Steve Alexander with a
won't work. This was reported by Steve Alexander with a
patch.
patch.
- Corrected local role computation (Hotfix 2000-12-15)
Zope 2.3.0 alpha 1
Zope 2.3.0 alpha 1
Features Added
Features Added
...
...
lib/python/AccessControl/User.py
View file @
fbe06467
...
@@ -84,7 +84,7 @@
...
@@ -84,7 +84,7 @@
##############################################################################
##############################################################################
"""Access control package"""
"""Access control package"""
__version__
=
'$Revision: 1.11
8
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.11
9
$'
[
11
:
-
2
]
import
Globals
,
socket
,
ts_regex
,
SpecialUsers
import
Globals
,
socket
,
ts_regex
,
SpecialUsers
import
os
import
os
...
@@ -158,15 +158,17 @@ class BasicUser(Implicit):
...
@@ -158,15 +158,17 @@ class BasicUser(Implicit):
local
=
{}
local
=
{}
object
=
getattr
(
object
,
'aq_inner'
,
object
)
object
=
getattr
(
object
,
'aq_inner'
,
object
)
while
1
:
while
1
:
if
hasattr
(
object
,
'__ac_local_roles__'
):
local_roles
=
getattr
(
object
,
'__ac_local_roles__'
,
None
)
local_roles
=
object
.
__ac_local_roles__
if
local_roles
:
if
callable
(
local_roles
):
if
callable
(
local_roles
):
local_roles
=
local_roles
()
local_roles
=
local_roles
()
dict
=
local_roles
or
{}
dict
=
local_roles
or
{}
for
r
in
dict
.
get
(
name
,
[]):
for
r
in
dict
.
get
(
name
,
[]):
local
[
r
]
=
1
local
[
r
]
=
1
if
hasattr
(
object
,
'aq_parent'
):
inner
=
getattr
(
object
,
'aq_inner'
,
object
)
object
=
object
.
aq_parent
parent
=
getattr
(
inner
,
'aq_parent'
,
None
)
if
parent
:
object
=
parent
continue
continue
if
hasattr
(
object
,
'im_self'
):
if
hasattr
(
object
,
'im_self'
):
object
=
object
.
im_self
object
=
object
.
im_self
...
@@ -176,7 +178,6 @@ class BasicUser(Implicit):
...
@@ -176,7 +178,6 @@ class BasicUser(Implicit):
roles
=
list
(
roles
)
+
local
.
keys
()
roles
=
list
(
roles
)
+
local
.
keys
()
return
roles
return
roles
def
getDomains
(
self
):
def
getDomains
(
self
):
"""Return the list of domain restrictions for a user"""
"""Return the list of domain restrictions for a user"""
raise
NotImplemented
raise
NotImplemented
...
...
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