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
5fdc5ef2
Commit
5fdc5ef2
authored
Jan 10, 2001
by
Evan Simpson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Made application of __roles__ attempt attribute assignment first.
parent
2f8660ad
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
8 deletions
+8
-8
lib/python/App/ProductContext.py
lib/python/App/ProductContext.py
+4
-2
lib/python/App/class_init.py
lib/python/App/class_init.py
+4
-6
No files found.
lib/python/App/ProductContext.py
View file @
5fdc5ef2
...
...
@@ -228,7 +228,8 @@ class ProductContext:
},)
m
[
name
]
=
initial
m
[
name
+
'__roles__'
]
=
pr
try
:
initial
.
__roles__
=
pr
except
:
m
[
name
+
'__roles__'
]
=
pr
for
method
in
constructors
[
1
:]:
if
type
(
method
)
is
tt
:
name
,
method
=
method
...
...
@@ -236,7 +237,8 @@ class ProductContext:
name
=
os
.
path
.
split
(
method
.
__name__
)[
-
1
]
if
not
productObject
.
__dict__
.
has_key
(
name
):
m
[
name
]
=
method
m
[
name
+
'__roles__'
]
=
pr
try
:
method
.
__roles__
=
pr
except
:
m
[
name
+
'__roles__'
]
=
pr
if
icon
:
name
=
os
.
path
.
split
(
icon
)[
1
]
...
...
lib/python/App/class_init.py
View file @
5fdc5ef2
...
...
@@ -99,12 +99,10 @@ 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_'
:
name
=
name
+
'__roles__'
if
not
have
(
name
):
dict
[
name
]
=
'Manager'
,
elif
name
==
'manage'
or
name
[:
7
]
==
'manage_'
and
type
(
v
)
is
ft
:
name
=
name
+
'__roles__'
if
not
have
(
name
):
dict
[
name
]
=
'Manager'
,
if
((
name
==
'manage'
or
name
[:
7
]
==
'manage_'
)
and
not
hasattr
(
v
,
'__roles__'
)):
try
:
v
.
__roles__
=
(
'Manager'
,)
except
:
dict
[
name
+
'__roles__'
]
=
(
'Manager'
,)
# 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