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
3b318776
Commit
3b318776
authored
Jan 29, 2004
by
Brian Lloyd
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix inadvertant getOwner result change
parent
b8153d8e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
4 deletions
+21
-4
lib/python/AccessControl/Owned.py
lib/python/AccessControl/Owned.py
+21
-4
No files found.
lib/python/AccessControl/Owned.py
View file @
3b318776
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
##############################################################################
##############################################################################
"""Support for owned objects
"""Support for owned objects
$Id: Owned.py,v 1.2
1 2004/01/27 16:59:23 tseaver
Exp $
$Id: Owned.py,v 1.2
2 2004/01/29 19:31:06 Brian
Exp $
"""
"""
import
Globals
,
urlparse
,
SpecialUsers
,
ExtensionClass
import
Globals
,
urlparse
,
SpecialUsers
,
ExtensionClass
...
@@ -62,7 +62,11 @@ class Owned(ExtensionClass.Base):
...
@@ -62,7 +62,11 @@ class Owned(ExtensionClass.Base):
return
d
return
d
getOwner__roles__
=
()
getOwner__roles__
=
()
def
getOwner
(
self
,
info
=
0
):
def
getOwner
(
self
,
info
=
0
,
aq_get
=
aq_get
,
None
=
None
,
UnownableOwner
=
UnownableOwner
,
getSecurityManager
=
getSecurityManager
,
):
"""Get the owner
"""Get the owner
If a true argument is provided, then only the owner path and id are
If a true argument is provided, then only the owner path and id are
...
@@ -74,9 +78,22 @@ class Owned(ExtensionClass.Base):
...
@@ -74,9 +78,22 @@ class Owned(ExtensionClass.Base):
'please use getOwnerTuple() instead.'
,
'please use getOwnerTuple() instead.'
,
DeprecationWarning
)
DeprecationWarning
)
return
self
.
getOwnerTuple
()
return
aq_base
(
self
.
getWrappedOwner
())
# ugh, backward compat.
owner
=
aq_get
(
self
,
'_owner'
,
None
,
1
)
if
info
or
(
owner
is
None
):
return
owner
if
owner
is
UnownableOwner
:
return
None
udb
,
oid
=
owner
root
=
self
.
getPhysicalRoot
()
udb
=
root
.
unrestrictedTraverse
(
udb
,
None
)
if
udb
is
None
:
user
=
SpecialUsers
.
nobody
else
:
user
=
udb
.
getUserById
(
oid
,
None
)
if
user
is
None
:
user
=
SpecialUsers
.
nobody
return
user
getOwnerTuple__roles__
=
()
getOwnerTuple__roles__
=
()
def
getOwnerTuple
(
self
):
def
getOwnerTuple
(
self
):
...
...
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