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
c0cab2db
Commit
c0cab2db
authored
Jan 21, 2004
by
Brian Lloyd
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix sc loss bug
parent
662ae7ae
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
7 deletions
+14
-7
lib/python/AccessControl/SecurityManagement.py
lib/python/AccessControl/SecurityManagement.py
+7
-2
lib/python/Products/Transience/Transience.py
lib/python/Products/Transience/Transience.py
+7
-5
No files found.
lib/python/AccessControl/SecurityManagement.py
View file @
c0cab2db
...
...
@@ -13,8 +13,8 @@
__doc__
=
'''short description
$Id: SecurityManagement.py,v 1.
9 2004/01/15 23:09:03 tseaver
Exp $'''
__version__
=
'$Revision: 1.
9
$'
[
11
:
-
2
]
$Id: SecurityManagement.py,v 1.
10 2004/01/21 19:59:09 Brian
Exp $'''
__version__
=
'$Revision: 1.
10
$'
[
11
:
-
2
]
def
getSecurityManager
():
"""Get a security manager, for the current thread.
...
...
@@ -32,6 +32,11 @@ def getSecurityManager():
return
manager
def
setSecurityManager
(
manager
):
"""install *manager* as current security manager for this thread."""
thread_id
=
get_ident
()
_managers
[
thread_id
]
=
manager
import
SpecialUsers
# AccessControl.Implementation inserts SecurityManager.
...
...
lib/python/Products/Transience/Transience.py
View file @
c0cab2db
...
...
@@ -13,10 +13,10 @@
"""
Transient Object Container Class ('timeslice'-based design).
$Id: Transience.py,v 1.3
4 2003/11/28 16:46:11 jim
Exp $
$Id: Transience.py,v 1.3
5 2004/01/21 19:59:09 Brian
Exp $
"""
__version__
=
'$Revision: 1.3
4
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.3
5
$'
[
11
:
-
2
]
import
Globals
from
Globals
import
HTMLFile
...
...
@@ -27,7 +27,8 @@ from OFS.SimpleItem import SimpleItem
from
Persistence
import
Persistent
from
Acquisition
import
Implicit
from
AccessControl
import
ClassSecurityInfo
,
getSecurityManager
from
AccessControl.SecurityManagement
import
newSecurityManager
from
AccessControl.SecurityManagement
import
newSecurityManager
,
\
setSecurityManager
from
AccessControl.User
import
nobody
from
BTrees.OOBTree
import
OOBTree
,
OOBucket
,
OOSet
from
BTrees.IOBTree
import
IOBTree
...
...
@@ -276,8 +277,9 @@ class TransientObjectContainer(SimpleItem):
for
item
in
items
:
if
callable
(
method
):
sm
=
getSecurityManager
()
try
:
user
=
getSecurityManager
()
.
getUser
()
user
=
sm
.
getUser
()
try
:
newSecurityManager
(
None
,
nobody
)
method
(
item
,
self
)
...
...
@@ -291,7 +293,7 @@ class TransientObjectContainer(SimpleItem):
error
=
sys
.
exc_info
()
)
finally
:
newSecurityManager
(
None
,
user
)
setSecurityManager
(
sm
)
else
:
err
=
'%s in %s attempted to call non-callable %s'
path
=
self
.
getPhysicalPath
()
...
...
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