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
Show 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:
...
@@ -228,7 +228,8 @@ class ProductContext:
},)
},)
m
[
name
]
=
initial
m
[
name
]
=
initial
m
[
name
+
'__roles__'
]
=
pr
try
:
initial
.
__roles__
=
pr
except
:
m
[
name
+
'__roles__'
]
=
pr
for
method
in
constructors
[
1
:]:
for
method
in
constructors
[
1
:]:
if
type
(
method
)
is
tt
:
name
,
method
=
method
if
type
(
method
)
is
tt
:
name
,
method
=
method
...
@@ -236,7 +237,8 @@ class ProductContext:
...
@@ -236,7 +237,8 @@ class ProductContext:
name
=
os
.
path
.
split
(
method
.
__name__
)[
-
1
]
name
=
os
.
path
.
split
(
method
.
__name__
)[
-
1
]
if
not
productObject
.
__dict__
.
has_key
(
name
):
if
not
productObject
.
__dict__
.
has_key
(
name
):
m
[
name
]
=
method
m
[
name
]
=
method
m
[
name
+
'__roles__'
]
=
pr
try
:
method
.
__roles__
=
pr
except
:
m
[
name
+
'__roles__'
]
=
pr
if
icon
:
if
icon
:
name
=
os
.
path
.
split
(
icon
)[
1
]
name
=
os
.
path
.
split
(
icon
)[
1
]
...
...
lib/python/App/class_init.py
View file @
5fdc5ef2
...
@@ -99,12 +99,10 @@ def default__class_init__(self):
...
@@ -99,12 +99,10 @@ def default__class_init__(self):
for
name
,
v
in
dict_items
:
for
name
,
v
in
dict_items
:
if
hasattr
(
v
,
'_need__name__'
)
and
v
.
_need__name__
:
if
hasattr
(
v
,
'_need__name__'
)
and
v
.
_need__name__
:
v
.
__dict__
[
'__name__'
]
=
name
v
.
__dict__
[
'__name__'
]
=
name
if
name
==
'manage'
or
name
[:
7
]
==
'manage_'
:
if
((
name
==
'manage'
or
name
[:
7
]
==
'manage_'
)
and
name
=
name
+
'__roles__'
not
hasattr
(
v
,
'__roles__'
)):
if
not
have
(
name
):
dict
[
name
]
=
'Manager'
,
try
:
v
.
__roles__
=
(
'Manager'
,)
elif
name
==
'manage'
or
name
[:
7
]
==
'manage_'
and
type
(
v
)
is
ft
:
except
:
dict
[
name
+
'__roles__'
]
=
(
'Manager'
,)
name
=
name
+
'__roles__'
if
not
have
(
name
):
dict
[
name
]
=
'Manager'
,
# Look for a SecurityInfo object on the class. If found, call its
# Look for a SecurityInfo object on the class. If found, call its
# apply() method to generate __ac_permissions__ for the class. We
# 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