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
4d82bbe0
Commit
4d82bbe0
authored
Jun 02, 2000
by
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added log calls in authentication machinery per patches sent by Jeff Rush.
parent
0c999435
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
4 deletions
+25
-4
lib/python/AccessControl/User.py
lib/python/AccessControl/User.py
+25
-4
No files found.
lib/python/AccessControl/User.py
View file @
4d82bbe0
...
...
@@ -84,7 +84,7 @@
##############################################################################
"""Access control package"""
__version__
=
'$Revision: 1.10
7
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.10
8
$'
[
11
:
-
2
]
import
Globals
,
socket
,
regex
,
SpecialUsers
from
Globals
import
HTMLFile
,
MessageDialog
,
Persistent
,
PersistentMapping
...
...
@@ -98,6 +98,7 @@ from Role import RoleManager
from
string
import
split
,
join
,
upper
from
PermissionRole
import
_what_not_even_god_should_do
,
rolesForPermissionOn
from
AuthEncoding
import
pw_validate
from
zLOG
import
LOG
,
INFO
,
WARNING
ListType
=
type
([])
NotImplemented
=
'NotImplemented'
...
...
@@ -177,10 +178,17 @@ class BasicUser(Implicit):
passwrd
=
self
.
_getPassword
()
result
=
pw_validate
(
passwrd
,
password
)
if
not
result
:
LOG
(
'Zope'
,
WARNING
,
'invalid password for user %s'
%
self
.
getUserName
())
domains
=
self
.
getDomains
()
if
domains
:
return
result
and
domainSpecMatch
(
domains
,
request
)
if
domains
and
result
:
result
=
domainSpecMatch
(
domains
,
request
)
if
not
result
:
LOG
(
'Zope'
,
WARNING
,
'invalid domain for user %s'
%
self
.
getUserName
())
return
result
return
result
def
_shared_roles
(
self
,
parent
):
...
...
@@ -438,6 +446,7 @@ class BasicUserFolder(Implicit, Persistent, Navigation, Tabs, RoleManager,
# Only do basic authentication
if
lower
(
auth
[:
6
])
!=
'basic '
:
LOG
(
'Zope'
,
WARNING
,
'non-basic authentication attempted'
)
return
None
name
,
password
=
tuple
(
split
(
decodestring
(
split
(
auth
)[
-
1
]),
':'
,
1
))
...
...
@@ -450,6 +459,8 @@ class BasicUserFolder(Implicit, Persistent, Navigation, Tabs, RoleManager,
# Try to get user
user
=
self
.
getUser
(
name
)
if
user
is
None
:
LOG
(
'Zope'
,
WARNING
,
'no such user as %s in %s'
\
%
(
name
,
self
.
absolute_url
()))
return
None
# Try to authenticate user
...
...
@@ -462,6 +473,11 @@ class BasicUserFolder(Implicit, Persistent, Navigation, Tabs, RoleManager,
# Try to authorize user
if
user
.
allowed
(
parent
,
roles
):
return
user
LOG
(
'Zope'
,
WARNING
,
'user %s is not authorized to access %s'
\
%
(
name
,
parent
.
absolute_url
()))
return
None
...
...
@@ -494,6 +510,8 @@ class BasicUserFolder(Implicit, Persistent, Navigation, Tabs, RoleManager,
# Try to get user
user
=
self
.
getUser
(
name
)
if
user
is
None
:
LOG
(
'Zope'
,
WARNING
,
'no such user as %s in %s'
\
%
(
name
,
self
.
absolute_url
()))
return
None
# We need the user to be able to acquire!
...
...
@@ -502,6 +520,9 @@ class BasicUserFolder(Implicit, Persistent, Navigation, Tabs, RoleManager,
# Try to authorize user
if
user
.
allowed
(
parent
,
roles
):
return
user
LOG
(
'Zope'
,
WARNING
,
'user %s is not authorized to access %s'
\
%
(
name
,
parent
.
absolute_url
()))
return
None
...
...
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