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
624917df
Commit
624917df
authored
Jan 22, 2001
by
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
merge from 2.3
parent
6d91c871
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
8 deletions
+11
-8
lib/python/AccessControl/User.py
lib/python/AccessControl/User.py
+11
-8
No files found.
lib/python/AccessControl/User.py
View file @
624917df
...
@@ -84,7 +84,7 @@
...
@@ -84,7 +84,7 @@
##############################################################################
##############################################################################
"""Access control package"""
"""Access control package"""
__version__
=
'$Revision: 1.13
6
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.13
7
$'
[
11
:
-
2
]
import
Globals
,
socket
,
ts_regex
,
SpecialUsers
import
Globals
,
socket
,
ts_regex
,
SpecialUsers
import
os
import
os
...
@@ -589,7 +589,8 @@ class BasicUserFolder(Implicit, Persistent, Navigation, Tabs, RoleManager,
...
@@ -589,7 +589,8 @@ class BasicUserFolder(Implicit, Persistent, Navigation, Tabs, RoleManager,
elif
user
is
None
:
elif
user
is
None
:
# either we didn't find the username, or the user's password
# either we didn't find the username, or the user's password
# was incorrect. try to authorize and return the anonymous user.
# was incorrect. try to authorize and return the anonymous user.
if
self
.
_isTop
()
and
self
.
authorize
(
self
.
_nobody
,
a
,
c
,
n
,
v
,
roles
):
if
self
.
_isTop
()
and
self
.
authorize
(
self
.
_nobody
.
__of__
(
self
),
a
,
c
,
n
,
v
,
roles
):
return
self
.
_nobody
.
__of__
(
self
)
return
self
.
_nobody
.
__of__
(
self
)
else
:
else
:
# anonymous can't authorize or we're not top-level user folder
# anonymous can't authorize or we're not top-level user folder
...
@@ -598,10 +599,11 @@ class BasicUserFolder(Implicit, Persistent, Navigation, Tabs, RoleManager,
...
@@ -598,10 +599,11 @@ class BasicUserFolder(Implicit, Persistent, Navigation, Tabs, RoleManager,
# We found a user, his password was correct, and the user
# We found a user, his password was correct, and the user
# wasn't the emergency user. We need to authorize the user
# wasn't the emergency user. We need to authorize the user
# against the published object.
# against the published object.
if
self
.
authorize
(
user
,
a
,
c
,
n
,
v
,
roles
):
if
self
.
authorize
(
user
.
__of__
(
self
)
,
a
,
c
,
n
,
v
,
roles
):
return
user
.
__of__
(
self
)
return
user
.
__of__
(
self
)
# That didn't work. Try to authorize the anonymous user.
# That didn't work. Try to authorize the anonymous user.
elif
self
.
_isTop
()
and
self
.
authorize
(
self
.
_nobody
,
a
,
c
,
n
,
v
,
roles
):
elif
self
.
_isTop
()
and
self
.
authorize
(
self
.
_nobody
.
__of__
(
self
),
a
,
c
,
n
,
v
,
roles
):
return
self
.
_nobody
.
__of__
(
self
)
return
self
.
_nobody
.
__of__
(
self
)
else
:
else
:
# we can't authorize the user, and we either can't authorize
# we can't authorize the user, and we either can't authorize
...
@@ -621,7 +623,8 @@ class BasicUserFolder(Implicit, Persistent, Navigation, Tabs, RoleManager,
...
@@ -621,7 +623,8 @@ class BasicUserFolder(Implicit, Persistent, Navigation, Tabs, RoleManager,
if
self
.
authenticate
(
if
self
.
authenticate
(
user
.
getUserName
(),
''
,
request
user
.
getUserName
(),
''
,
request
):
):
if
self
.
authorize
(
user
,
a
,
c
,
n
,
v
,
roles
):
if
self
.
authorize
(
user
.
__of__
(
self
),
a
,
c
,
n
,
v
,
roles
):
return
user
.
__of__
(
self
)
return
user
.
__of__
(
self
)
user
=
self
.
getUser
(
name
)
user
=
self
.
getUser
(
name
)
...
@@ -639,7 +642,7 @@ class BasicUserFolder(Implicit, Persistent, Navigation, Tabs, RoleManager,
...
@@ -639,7 +642,7 @@ class BasicUserFolder(Implicit, Persistent, Navigation, Tabs, RoleManager,
elif
user
is
None
:
elif
user
is
None
:
# we didn't find the username in this database
# we didn't find the username in this database
# try to authorize and return the anonymous user.
# try to authorize and return the anonymous user.
if
self
.
_isTop
()
and
self
.
authorize
(
self
.
_nobody
,
if
self
.
_isTop
()
and
self
.
authorize
(
self
.
_nobody
.
__of__
(
self
)
,
a
,
c
,
n
,
v
,
roles
):
a
,
c
,
n
,
v
,
roles
):
return
self
.
_nobody
.
__of__
(
self
)
return
self
.
_nobody
.
__of__
(
self
)
else
:
else
:
...
@@ -649,11 +652,11 @@ class BasicUserFolder(Implicit, Persistent, Navigation, Tabs, RoleManager,
...
@@ -649,11 +652,11 @@ class BasicUserFolder(Implicit, Persistent, Navigation, Tabs, RoleManager,
else
:
else
:
# We found a user and the user wasn't the emergency user.
# We found a user and the user wasn't the emergency user.
# We need to authorize the user against the published object.
# We need to authorize the user against the published object.
if
self
.
authorize
(
user
,
a
,
c
,
n
,
v
,
roles
):
if
self
.
authorize
(
user
.
__of__
(
self
)
,
a
,
c
,
n
,
v
,
roles
):
return
user
.
__of__
(
self
)
return
user
.
__of__
(
self
)
# That didn't work. Try to authorize the anonymous user.
# That didn't work. Try to authorize the anonymous user.
elif
self
.
_isTop
()
and
self
.
authorize
(
elif
self
.
_isTop
()
and
self
.
authorize
(
self
.
_nobody
,
a
,
c
,
n
,
v
,
roles
):
self
.
_nobody
.
__of__
(
self
)
,
a
,
c
,
n
,
v
,
roles
):
return
self
.
_nobody
.
__of__
(
self
)
return
self
.
_nobody
.
__of__
(
self
)
else
:
else
:
# we can't authorize the user, and we either can't
# we can't authorize the user, and we either can't
...
...
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