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
cf0251db
Commit
cf0251db
authored
Mar 14, 2001
by
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merged fixes missed from 2.3 branch
parent
b4af2142
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
9 deletions
+7
-9
lib/python/AccessControl/User.py
lib/python/AccessControl/User.py
+7
-9
No files found.
lib/python/AccessControl/User.py
View file @
cf0251db
...
@@ -84,7 +84,7 @@
...
@@ -84,7 +84,7 @@
##############################################################################
##############################################################################
"""Access control package"""
"""Access control package"""
__version__
=
'$Revision: 1.14
4
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.14
5
$'
[
11
:
-
2
]
import
Globals
,
socket
,
ts_regex
,
SpecialUsers
import
Globals
,
socket
,
ts_regex
,
SpecialUsers
import
os
import
os
...
@@ -603,11 +603,10 @@ class BasicUserFolder(Implicit, Persistent, Navigation, Tabs, RoleManager,
...
@@ -603,11 +603,10 @@ 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
.
__of__
(
self
)
,
a
,
c
,
n
,
v
,
roles
):
if
self
.
authorize
(
user
,
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
.
__of__
(
self
),
elif
self
.
_isTop
()
and
self
.
authorize
(
self
.
_nobody
,
a
,
c
,
n
,
v
,
roles
):
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
...
@@ -627,8 +626,7 @@ class BasicUserFolder(Implicit, Persistent, Navigation, Tabs, RoleManager,
...
@@ -627,8 +626,7 @@ class BasicUserFolder(Implicit, Persistent, Navigation, Tabs, RoleManager,
if
self
.
authenticate
(
if
self
.
authenticate
(
user
.
getUserName
(),
''
,
request
user
.
getUserName
(),
''
,
request
):
):
if
self
.
authorize
(
user
.
__of__
(
self
),
a
,
c
,
if
self
.
authorize
(
user
,
a
,
c
,
n
,
v
,
roles
):
n
,
v
,
roles
):
return
user
.
__of__
(
self
)
return
user
.
__of__
(
self
)
user
=
self
.
getUser
(
name
)
user
=
self
.
getUser
(
name
)
...
@@ -646,7 +644,7 @@ class BasicUserFolder(Implicit, Persistent, Navigation, Tabs, RoleManager,
...
@@ -646,7 +644,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
.
__of__
(
self
)
,
if
self
.
_isTop
()
and
self
.
authorize
(
self
.
_nobody
,
a
,
c
,
n
,
v
,
roles
):
a
,
c
,
n
,
v
,
roles
):
return
self
.
_nobody
.
__of__
(
self
)
return
self
.
_nobody
.
__of__
(
self
)
else
:
else
:
...
@@ -656,11 +654,11 @@ class BasicUserFolder(Implicit, Persistent, Navigation, Tabs, RoleManager,
...
@@ -656,11 +654,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
.
__of__
(
self
)
,
a
,
c
,
n
,
v
,
roles
):
if
self
.
authorize
(
user
,
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
.
__of__
(
self
)
,
a
,
c
,
n
,
v
,
roles
):
self
.
_nobody
,
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