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
fc67cd99
Commit
fc67cd99
authored
Jan 13, 2001
by
Shane Hathaway
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Corrected some roles assertions and fixed a NameError in manage_logout.
parent
a2884c39
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
17 deletions
+20
-17
lib/python/App/Management.py
lib/python/App/Management.py
+9
-13
lib/python/App/class_init.py
lib/python/App/class_init.py
+11
-4
No files found.
lib/python/App/Management.py
View file @
fc67cd99
...
...
@@ -85,9 +85,9 @@
"""Standard management interface support
$Id: Management.py,v 1.4
1 2001/01/12 20:49:58
shane Exp $"""
$Id: Management.py,v 1.4
2 2001/01/13 15:01:55
shane Exp $"""
__version__
=
'$Revision: 1.4
1
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.4
2
$'
[
11
:
-
2
]
import
sys
,
Globals
,
ExtensionClass
,
urllib
from
Dialogs
import
MessageDialog
...
...
@@ -214,20 +214,19 @@ class Navigation(ExtensionClass.Base):
manage_page_header
=
DTMLFile
(
'dtml/manage_page_header'
,
globals
())
manage_page_footer
=
DTMLFile
(
'dtml/manage_page_footer'
,
globals
())
manage_form_title__roles__
=
None
manage_form_title
=
DTMLFile
(
'dtml/manage_form_title'
,
globals
(),
form_title
=
'Add Form'
,
help_product
=
None
,
help_topic
=
None
)
manage_form_title
.
_setFuncSignature
(
varnames
=
(
'form_title'
,
'help_product'
,
'help_topic'
)
)
manage_form_title
.
__roles__
=
None
manage_copyright__roles__
=
None
manage_copyright
=
DTMLFile
(
'dtml/copyright'
,
globals
())
manage_copyright
.
__roles__
=
None
manage_logout__roles__
=
None
def
manage_logout
(
self
):
manage_logout__roles__
=
None
def
manage_logout
(
self
,
REQUEST
=
None
):
"""Logout current user"""
p
=
getattr
(
REQUEST
,
'_logout_path'
,
None
)
if
p
is
not
None
:
...
...
@@ -239,11 +238,8 @@ Sorry, this is not yet implemented.
</body>
</html>"""
setattr
(
Navigation
,
'manage_page_style.css'
,
DTMLFile
(
'dtml/manage_page_style.css'
,
globals
())
)
setattr
(
Navigation
,
'manage_page_style.css__roles__'
,
None
)
file
=
DTMLFile
(
'dtml/manage_page_style.css'
,
globals
())
setattr
(
Navigation
,
'manage_page_style.css'
,
file
)
file
.
__roles__
=
None
Globals
.
default__class_init__
(
Navigation
)
lib/python/App/class_init.py
View file @
fc67cd99
...
...
@@ -99,10 +99,17 @@ def default__class_init__(self):
for
name
,
v
in
dict_items
:
if
hasattr
(
v
,
'_need__name__'
)
and
v
.
_need__name__
:
v
.
__dict__
[
'__name__'
]
=
name
if
((
name
==
'manage'
or
name
[:
7
]
==
'manage_'
)
and
not
hasattr
(
v
,
'__roles__'
)):
try
:
v
.
__roles__
=
(
'Manager'
,)
except
:
dict
[
name
+
'__roles__'
]
=
(
'Manager'
,)
if
name
==
'manage'
or
name
[:
7
]
==
'manage_'
:
if
not
hasattr
(
v
,
'__roles__'
):
try
:
v
.
__roles__
=
(
'Manager'
,)
except
:
# This attribute can't hold a __roles__
# attribute. Try to store __roles__ in the
# class instead.
nr
=
name
+
'__roles__'
if
not
have
(
nr
):
try
:
dict
[
nr
]
=
(
'Manager'
,)
except
:
pass
# Look for a SecurityInfo object on the class. If found, call its
# apply() method to generate __ac_permissions__ for the class. We
...
...
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