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
85cc5cc8
Commit
85cc5cc8
authored
May 21, 2010
by
Tres Seaver
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Readability.
parent
30a5419d
Changes
1
Hide 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 @
85cc5cc8
...
@@ -18,7 +18,8 @@ class AccessRule(NameCaller):
...
@@ -18,7 +18,8 @@ class AccessRule(NameCaller):
meta_type
=
'Set Access Rule'
meta_type
=
'Set Access Rule'
def
__call__
(
self
,
container
,
request
):
def
__call__
(
self
,
container
,
request
):
if
SUPPRESS_ACCESSRULE
:
return
if
SUPPRESS_ACCESSRULE
:
return
if
'_SUPPRESS_ACCESSRULE'
in
_swallow
(
request
,
'_SUPPRESS'
):
if
'_SUPPRESS_ACCESSRULE'
in
_swallow
(
request
,
'_SUPPRESS'
):
request
.
setVirtualRoot
(
request
.
steps
)
request
.
setVirtualRoot
(
request
.
steps
)
return
return
...
@@ -44,8 +45,10 @@ def manage_addAccessRule(self, method_id=None, REQUEST=None, **ignored):
...
@@ -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'
)):
if
method_id
is
None
or
(
REQUEST
and
REQUEST
.
form
.
has_key
(
'none'
)):
rules
=
unregisterBeforeTraverse
(
self
,
'AccessRule'
)
rules
=
unregisterBeforeTraverse
(
self
,
'AccessRule'
)
if
rules
:
if
rules
:
try
:
del
getattr
(
self
,
rules
[
0
].
name
).
icon
try
:
except
:
pass
del
getattr
(
self
,
rules
[
0
].
name
).
icon
except
:
pass
if
REQUEST
:
if
REQUEST
:
return
MessageDialog
(
title
=
'No Access Rule'
,
return
MessageDialog
(
title
=
'No Access Rule'
,
message
=
'This object now has 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):
...
@@ -53,13 +56,16 @@ def manage_addAccessRule(self, method_id=None, REQUEST=None, **ignored):
elif
method_id
and
hasattr
(
self
,
method_id
):
elif
method_id
and
hasattr
(
self
,
method_id
):
rules
=
unregisterBeforeTraverse
(
self
,
'AccessRule'
)
rules
=
unregisterBeforeTraverse
(
self
,
'AccessRule'
)
if
rules
:
if
rules
:
try
:
del
getattr
(
self
,
rules
[
0
].
name
).
icon
try
:
except
:
pass
del
getattr
(
self
,
rules
[
0
].
name
).
icon
except
:
pass
hook
=
AccessRule
(
method_id
)
hook
=
AccessRule
(
method_id
)
registerBeforeTraverse
(
self
,
hook
,
'AccessRule'
,
1
)
registerBeforeTraverse
(
self
,
hook
,
'AccessRule'
,
1
)
try
:
try
:
getattr
(
self
,
method_id
).
icon
=
'misc_/SiteAccess/AccessRule.gif'
getattr
(
self
,
method_id
).
icon
=
'misc_/SiteAccess/AccessRule.gif'
except
:
pass
except
:
pass
if
REQUEST
:
if
REQUEST
:
return
MessageDialog
(
title
=
'Access Rule Set'
,
return
MessageDialog
(
title
=
'Access Rule Set'
,
message
=
'"%s" is now the Access Rule for this object'
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