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
c3b89cf6
Commit
c3b89cf6
authored
Apr 05, 2010
by
Hanno Schlichting
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid checking for aq_parent as an attribute
parent
966fde8b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
src/App/Undo.py
src/App/Undo.py
+7
-6
No files found.
src/App/Undo.py
View file @
c3b89cf6
...
...
@@ -74,26 +74,27 @@ class UndoSupport(ExtensionClass.Base):
PrincipiaUndoBatchSize
=
None
):
if
first_transaction
is
None
:
first_transaction
=
self
.
get_request_var_or_attr
(
first_transaction
=
self
.
get_request_var_or_attr
(
'first_transaction'
,
0
)
if
PrincipiaUndoBatchSize
is
None
:
PrincipiaUndoBatchSize
=
self
.
get_request_var_or_attr
(
PrincipiaUndoBatchSize
=
self
.
get_request_var_or_attr
(
'PrincipiaUndoBatchSize'
,
20
)
if
last_transaction
is
None
:
last_transaction
=
self
.
get_request_var_or_attr
(
last_transaction
=
self
.
get_request_var_or_attr
(
'last_transaction'
,
first_transaction
+
PrincipiaUndoBatchSize
)
spec
=
{}
spec
=
{}
# A user is allowed to undo transactions that were initiated
# by any member of a user folder in the place where the user
# is defined.
user
=
getSecurityManager
().
getUser
()
if
hasattr
(
user
,
'aq_parent'
):
path
=
'/'
.
join
(
user
.
aq_parent
.
getPhysicalPath
()[
1
:
-
1
])
user_parent
=
aq_parent
(
user
)
if
user_parent
is
not
None
:
path
=
'/'
.
join
(
user_parent
.
getPhysicalPath
()[
1
:
-
1
])
else
:
path
=
''
if
path
:
...
...
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