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
6e3232f7
Commit
6e3232f7
authored
Jan 18, 2001
by
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
merge from 2.3
parent
e09f6db9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
46 additions
and
3 deletions
+46
-3
lib/python/AccessControl/User.py
lib/python/AccessControl/User.py
+45
-2
z2.py
z2.py
+1
-1
No files found.
lib/python/AccessControl/User.py
View file @
6e3232f7
...
@@ -84,7 +84,7 @@
...
@@ -84,7 +84,7 @@
##############################################################################
##############################################################################
"""Access control package"""
"""Access control package"""
__version__
=
'$Revision: 1.13
5
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.13
6
$'
[
11
:
-
2
]
import
Globals
,
socket
,
ts_regex
,
SpecialUsers
import
Globals
,
socket
,
ts_regex
,
SpecialUsers
import
os
import
os
...
@@ -344,6 +344,49 @@ class UnrestrictedUser(SpecialUser):
...
@@ -344,6 +344,49 @@ class UnrestrictedUser(SpecialUser):
def
has_permission
(
self
,
permission
,
object
):
return
1
def
has_permission
(
self
,
permission
,
object
):
return
1
class
NullUnrestrictedUser
(
SpecialUser
):
"""User created if no emergency user exists. It is only around to
satisfy third party userfolder implementations that may
expect the emergency user to exist and to be able to call certain
methods on it (in other words, backward compatibility).
Note that when no emergency user is installed, this object that
exists in its place is more of an anti-superuser since you cannot
login as this user and it has no priveleges at all."""
__null_user__
=
1
def
__init__
(
self
):
pass
def
getUserName
(
self
):
# return an unspellable username
return
(
None
,
None
)
_getPassword
=
getUserName
def
getRoles
(
self
):
return
()
getDomains
=
getRoles
def
getRolesInContext
(
self
,
object
):
return
()
def
authenticate
(
self
,
password
,
request
):
return
0
def
allowed
(
self
,
parent
,
roles
=
None
):
return
0
hasRole
=
allowed
def
has_role
(
self
,
roles
,
object
=
None
):
return
0
def
has_permission
(
self
,
permission
,
object
):
return
0
def
readUserAccessFile
(
filename
):
def
readUserAccessFile
(
filename
):
'''Reads an access file from INSTANCE_HOME.
'''Reads an access file from INSTANCE_HOME.
Returns name, password, domains, remote_user_mode.
Returns name, password, domains, remote_user_mode.
...
@@ -374,7 +417,7 @@ if info:
...
@@ -374,7 +417,7 @@ if info:
emergency_user
=
UnrestrictedUser
(
emergency_user
=
UnrestrictedUser
(
info
[
0
],
info
[
1
],
(
'manage'
,),
info
[
2
])
info
[
0
],
info
[
1
],
(
'manage'
,),
info
[
2
])
else
:
else
:
emergency_user
=
N
one
emergency_user
=
N
ullUnrestrictedUser
()
super
=
emergency_user
# Note: use of the 'super' name is deprecated.
super
=
emergency_user
# Note: use of the 'super' name is deprecated.
del
info
del
info
...
...
z2.py
View file @
6e3232f7
...
@@ -700,7 +700,7 @@ if FCGI_PORT and not READ_ONLY:
...
@@ -700,7 +700,7 @@ if FCGI_PORT and not READ_ONLY:
# Monitor Server
# Monitor Server
if
MONITOR_PORT
:
if
MONITOR_PORT
:
from
AccessControl.User
import
emergency_user
from
AccessControl.User
import
emergency_user
if
emergency_user
:
if
not
hasattr
(
emergency_user
,
'__null_user__'
)
:
pw
=
emergency_user
.
_getPassword
()
pw
=
emergency_user
.
_getPassword
()
else
:
else
:
pw
=
None
pw
=
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