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
d1a9c53b
Commit
d1a9c53b
authored
Dec 11, 2000
by
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added SecurityInfo handling to class initializer
parent
642f5418
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
1 deletion
+13
-1
lib/python/App/class_init.py
lib/python/App/class_init.py
+13
-1
No files found.
lib/python/App/class_init.py
View file @
d1a9c53b
...
...
@@ -95,7 +95,8 @@ def default__class_init__(self):
dict
=
self
.
__dict__
have
=
dict
.
has_key
ft
=
type
(
default__class_init__
)
for
name
,
v
in
dict
.
items
():
dict_items
=
dict
.
items
()
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_'
:
...
...
@@ -105,6 +106,17 @@ def default__class_init__(self):
name
=
name
+
'__roles__'
if
not
have
(
name
):
dict
[
name
]
=
'Manager'
,
# Look for a SecurityInfo object on the class. If found, call its
# apply() method to generate __ac_permissions__ for the class. We
# delete the SecurityInfo from the class dict after it has been
# applied out of paranoia.
for
key
,
value
in
dict_items
:
if
hasattr
(
value
,
'__security_info__'
):
security_info
=
value
security_info
.
apply
(
self
)
del
dict
[
key
]
break
if
self
.
__dict__
.
has_key
(
'__ac_permissions__'
):
AccessControl
.
Permission
.
registerPermissions
(
self
.
__ac_permissions__
)
for
acp
in
self
.
__ac_permissions__
:
...
...
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