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
8395f51e
Commit
8395f51e
authored
Jul 11, 2000
by
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merged anonymous user handling fix from 2.2 branch
parent
4827db83
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
2 deletions
+24
-2
lib/python/AccessControl/User.py
lib/python/AccessControl/User.py
+24
-2
No files found.
lib/python/AccessControl/User.py
View file @
8395f51e
...
...
@@ -84,7 +84,7 @@
##############################################################################
"""Access control package"""
__version__
=
'$Revision: 1.11
1
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.11
2
$'
[
11
:
-
2
]
import
Globals
,
socket
,
regex
,
SpecialUsers
from
Globals
import
HTMLFile
,
MessageDialog
,
Persistent
,
PersistentMapping
...
...
@@ -449,10 +449,32 @@ class BasicUserFolder(Implicit, Persistent, Navigation, Tabs, RoleManager,
# Try to get user
user
=
self
.
getUser
(
name
)
if
user
is
None
:
# If the user was not found and we are the top level user
# database and the Anonymous user is allowed to access the
# requested object, return the Anonymous user.
if
self
.
_isTop
()
and
self
.
_nobody
.
allowed
(
parent
,
roles
):
user
=
self
.
_nobody
.
__of__
(
self
)
return
user
# Otherwise, return None which will defer to higher level user
# databases or cause an unauthorized to be raised in the
# publisher layer.
return
None
# Try to authenticate user
# Try to authenticate
the
user
if
not
user
.
authenticate
(
password
,
request
):
# If no user was authenticated and we are the top level user
# database and the Anonymous user is allowed to access the
# requested object, return the Anonymous user.
if
self
.
_isTop
()
and
self
.
_nobody
.
allowed
(
parent
,
roles
):
user
=
self
.
_nobody
.
__of__
(
self
)
return
user
# Otherwise, return None which will defer to higher level user
# databases or cause an unauthorized to be raised in the
# publisher layer.
return
None
# We need the user to be able to acquire!
...
...
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