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
a09d23fc
Commit
a09d23fc
authored
May 21, 2010
by
Tres Seaver
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merge readability fix from 2.12 branch.
parent
6748d77c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
6 deletions
+12
-6
src/Products/SiteAccess/AccessRule.py
src/Products/SiteAccess/AccessRule.py
+12
-6
No files found.
src/Products/SiteAccess/AccessRule.py
View file @
a09d23fc
...
...
@@ -18,7 +18,8 @@ class AccessRule(NameCaller):
meta_type
=
'Set Access Rule'
def
__call__
(
self
,
container
,
request
):
if
SUPPRESS_ACCESSRULE
:
return
if
SUPPRESS_ACCESSRULE
:
return
if
'_SUPPRESS_ACCESSRULE'
in
_swallow
(
request
,
'_SUPPRESS'
):
request
.
setVirtualRoot
(
request
.
steps
)
return
...
...
@@ -44,8 +45,10 @@ def manage_addAccessRule(self, method_id=None, REQUEST=None, **ignored):
if
method_id
is
None
or
(
REQUEST
and
REQUEST
.
form
.
has_key
(
'none'
)):
rules
=
unregisterBeforeTraverse
(
self
,
'AccessRule'
)
if
rules
:
try
:
del
getattr
(
self
,
rules
[
0
].
name
).
icon
except
:
pass
try
:
del
getattr
(
self
,
rules
[
0
].
name
).
icon
except
:
pass
if
REQUEST
:
return
MessageDialog
(
title
=
'No Access Rule'
,
message
=
'This object now has no Access Rule'
,
...
...
@@ -53,13 +56,16 @@ def manage_addAccessRule(self, method_id=None, REQUEST=None, **ignored):
elif
method_id
and
hasattr
(
self
,
method_id
):
rules
=
unregisterBeforeTraverse
(
self
,
'AccessRule'
)
if
rules
:
try
:
del
getattr
(
self
,
rules
[
0
].
name
).
icon
except
:
pass
try
:
del
getattr
(
self
,
rules
[
0
].
name
).
icon
except
:
pass
hook
=
AccessRule
(
method_id
)
registerBeforeTraverse
(
self
,
hook
,
'AccessRule'
,
1
)
try
:
getattr
(
self
,
method_id
).
icon
=
'misc_/SiteAccess/AccessRule.gif'
except
:
pass
except
:
pass
if
REQUEST
:
return
MessageDialog
(
title
=
'Access Rule Set'
,
message
=
'"%s" is now the Access Rule for this object'
...
...
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