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
f10f5ddf
Commit
f10f5ddf
authored
Apr 08, 1999
by
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added changes that allow the top level userfolder to be replaced by a
UserDB or other userfolder-like object.
parent
8117164d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
17 deletions
+20
-17
lib/python/OFS/Application.py
lib/python/OFS/Application.py
+9
-3
lib/python/OFS/ObjectManager.py
lib/python/OFS/ObjectManager.py
+11
-14
No files found.
lib/python/OFS/Application.py
View file @
f10f5ddf
...
...
@@ -85,8 +85,8 @@
__doc__
=
'''Application support
$Id: Application.py,v 1.9
8 1999/04/01 16:04:32 jim
Exp $'''
__version__
=
'$Revision: 1.9
8
$'
[
11
:
-
2
]
$Id: Application.py,v 1.9
9 1999/04/08 14:04:54 brian
Exp $'''
__version__
=
'$Revision: 1.9
9
$'
[
11
:
-
2
]
import
Globals
,
Folder
,
os
,
regex
,
sys
,
App
.
Product
,
App
.
ProductRegistry
,
misc_
...
...
@@ -170,9 +170,15 @@ class Application(Globals.ApplicationDefaultPermissions, Folder.Folder,
_reserved_names
=
(
'standard_html_header'
,
'standard_html_footer'
,
'standard_error_message'
,
'acl_users'
,
'Control_Panel'
)
# This class-default __allow_groups__ ensures that the
# superuser can still access the system if the top-level
# UserFolder is deleted. This is necessary to allow people
# to replace the top-level UserFolder object.
__allow_groups__
=
UserFolder
()
def
_init
(
self
):
# Initialize users
self
.
__allow_groups__
=
UserFolder
()
...
...
lib/python/OFS/ObjectManager.py
View file @
f10f5ddf
...
...
@@ -84,9 +84,9 @@
##############################################################################
__doc__
=
"""Object Manager
$Id: ObjectManager.py,v 1.6
2 1999/04/06 19:16:11
brian Exp $"""
$Id: ObjectManager.py,v 1.6
3 1999/04/08 14:04:54
brian Exp $"""
__version__
=
'$Revision: 1.6
2
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.6
3
$'
[
11
:
-
2
]
import
App.Management
,
Acquisition
,
App
.
Undo
,
Globals
,
CopySupport
import
os
,
App
.
FactoryDispatcher
,
ts_regex
,
Products
...
...
@@ -199,23 +199,20 @@ class ObjectManager(
except
:
t
=
None
self
.
_objects
=
self
.
_objects
+
({
'id'
:
id
,
'meta_type'
:
t
},)
self
.
_setOb
(
id
,
object
)
# This is a nasty hack that provides a workaround for any
# existing customers with the acl_users/__allow_groups__
# bug. Basically when you add an object, we'll do the check
# an make the fix if necessary.
have
=
self
.
__dict__
.
has_key
if
have
(
'__allow_groups__'
)
and
(
not
have
(
'acl_users'
)):
delattr
(
self
,
'__allow_groups__'
)
return
id
def
_delObject
(
self
,
id
):
if
id
==
'acl_users'
:
# Yikes - acl_users is referred to by two names and
# must be treated as a special case!
try
:
delattr
(
self
,
'__allow_groups__'
)
except
:
pass
# must be treated as a special case! Only get rid of
# __allow_groups__ if it is an instance attribute, to
# avoid deleting the class-default __allow_groups__
# in the top-level application object which is needed
# to allow people to replace the top-level userfolder.
if
hasattr
(
self
,
'__allow_groups__'
)
and
\
self
.
__dict__
.
has_key
(
'__allow_groups__'
):
delattr
(
self
,
'__allow_groups__'
)
self
.
_objects
=
tuple
(
filter
(
lambda
i
,
n
=
id
:
i
[
'id'
]
!=
n
,
self
.
_objects
))
self
.
_delOb
(
id
)
...
...
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