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
7aafcc19
Commit
7aafcc19
authored
Jul 29, 1999
by
Amos Latteier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added automatic constructor permission creation to the ZClass wizard.
parent
05a3989d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
3 deletions
+15
-3
lib/python/ZClasses/Basic.py
lib/python/ZClasses/Basic.py
+2
-1
lib/python/ZClasses/ZClass.py
lib/python/ZClasses/ZClass.py
+12
-1
lib/python/ZClasses/addZClass.dtml
lib/python/ZClasses/addZClass.dtml
+1
-1
No files found.
lib/python/ZClasses/Basic.py
View file @
7aafcc19
...
...
@@ -259,7 +259,8 @@ class ZClassPermissionsSheet(OFS.PropertySheets.PropertySheet,
self
.
setClassAttr
(
'__ac_permissions__'
,
tuple
(
r
))
return
self
.
manage
(
self
,
REQUEST
,
if
REQUEST
is
not
None
:
return
self
.
manage
(
self
,
REQUEST
,
manage_tabs_message
=
"Permissions updated"
)
lib/python/ZClasses/ZClass.py
View file @
7aafcc19
...
...
@@ -151,13 +151,24 @@ def manage_addZClass(self, id, title='', baseclasses=[],
id
+
' constructor'
,
addDefault
%
{
'id'
:
id
},
)
self
.
manage_addPermission
(
id
+
'_add_permission'
,
id
+
' constructor permission'
,
'Add %ss'
%
meta_type
)
self
.
manage_addPrincipiaFactory
(
id
+
'_factory'
,
id
+
' factory'
,
meta_type
,
id
+
'_addForm'
,
'Add %ss'
%
meta_type
)
getattr
(
self
,
id
).
propertysheets
.
permissions
.
manage_edit
(
selected
=
[
'Add %ss'
%
id
])
getattr
(
self
,
id
).
manage_setPermissionMapping
(
permission_names
=
[
'Create class instances'
],
class_permissions
=
[
'Add %ss'
%
meta_type
]
)
if
REQUEST
is
not
None
:
return
self
.
manage_main
(
self
,
REQUEST
,
update_menu
=
1
)
...
...
lib/python/ZClasses/addZClass.dtml
View file @
7aafcc19
...
...
@@ -51,7 +51,7 @@
<TD ALIGN="LEFT" VALIGN="TOP" COLSPAN="2">
<INPUT TYPE="CHECKBOX" NAME="CreateAFactory:int" VALUE="1"
<!--#if CreateAFactory-->CHECKED<!--#/if-->>
<STRONG>Create
Factory and add method
s.</STRONG>
<STRONG>Create
constructor object
s.</STRONG>
</TD>
</TR>
...
...
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