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
b2e47b34
Commit
b2e47b34
authored
May 26, 1999
by
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added better error messages to handle lack of or incorrectly formatted
access file problems.
parent
df2032fa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
3 deletions
+10
-3
lib/python/AccessControl/User.py
lib/python/AccessControl/User.py
+10
-3
No files found.
lib/python/AccessControl/User.py
View file @
b2e47b34
...
...
@@ -84,7 +84,7 @@
##############################################################################
"""Access control package"""
__version__
=
'$Revision: 1.7
6
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.7
7
$'
[
11
:
-
2
]
import
Globals
,
App
.
Undo
,
socket
,
regex
from
Globals
import
HTMLFile
,
MessageDialog
,
Persistent
,
PersistentMapping
...
...
@@ -283,6 +283,11 @@ class Super(User):
_remote_user_mode
=
0
try
:
f
=
open
(
'%s/access'
%
INSTANCE_HOME
,
'r'
)
except
IOError
:
raise
'InstallError'
,
(
'No access file found at %s - see INSTALL.txt'
%
INSTANCE_HOME
)
try
:
data
=
split
(
strip
(
f
.
readline
()),
':'
)
f
.
close
()
_remote_user_mode
=
not
data
[
1
]
...
...
@@ -291,7 +296,7 @@ try:
super
=
Super
(
data
[
0
],
data
[
1
],(
'manage'
,),
ds
)
del
data
except
:
raise
'InstallError'
,
'
No access file found
- see INSTALL.txt'
raise
'InstallError'
,
'
Invalid format for access file
- see INSTALL.txt'
nobody
=
User
(
'Anonymous User'
,
''
,(
'Anonymous'
,),
[])
...
...
@@ -594,7 +599,9 @@ class BasicUserFolder(Implicit, Persistent, Navigation, Tabs, RoleManager,
# Copy/Paste support
def
_notifyOfCopyTo
(
self
,
container
,
op
=
0
):
if
hasattr
(
container
,
'__allow_groups__'
):
if
hasattr
(
container
,
'aq_base'
):
container
=
container
.
aq_base
if
hasattr
(
container
,
'acl_users'
):
raise
TypeError
,
(
'Target already contains a UserFolder.'
)
...
...
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