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
eee81411
Commit
eee81411
authored
Aug 14, 2000
by
Shane Hathaway
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Modified Chris's factory bug fix to not interfere with .zexp import.
parent
8561d0d6
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
4 deletions
+11
-4
lib/python/App/Factory.py
lib/python/App/Factory.py
+7
-4
lib/python/App/Product.py
lib/python/App/Product.py
+2
-0
lib/python/ZClasses/Method.py
lib/python/ZClasses/Method.py
+2
-0
No files found.
lib/python/App/Factory.py
View file @
eee81411
...
...
@@ -84,8 +84,8 @@
##############################################################################
__doc__
=
'''Factory objects
$Id: Factory.py,v 1.
19 2000/08/07 15:44:26 brian
Exp $'''
__version__
=
'$Revision: 1.
19
$'
[
11
:
-
2
]
$Id: Factory.py,v 1.
20 2000/08/14 14:34:23 shane
Exp $'''
__version__
=
'$Revision: 1.
20
$'
[
11
:
-
2
]
import
OFS.SimpleItem
,
Acquisition
,
Globals
,
AccessControl
.
Role
import
Products
,
Product
...
...
@@ -123,6 +123,11 @@ class Factory(
self
.
initial
=
initial
self
.
permission
=
permission
initializePermission__roles__
=
()
def
initializePermission
(
self
):
self
.
manage_setPermissionMapping
((
'Use Factories'
,),
(
self
.
permission
,))
def
manage_edit
(
self
,
title
,
object_type
,
initial
,
permission
=
''
,
REQUEST
=
None
):
"Modify factory properties."
...
...
@@ -140,8 +145,6 @@ class Factory(
container
=
self
.
aq_parent
elif
item
is
not
self
:
container
=
None
self
.
manage_setPermissionMapping
((
'Use Factories'
,),
(
self
.
permission
,))
if
(
item
is
self
or
getattr
(
container
,
'__class__'
,
None
)
is
Product
.
Product
):
self
.
_register
()
...
...
lib/python/App/Product.py
View file @
eee81411
...
...
@@ -204,6 +204,8 @@ class Product(Folder, PermissionManager):
' '
i
=
Factory
(
id
,
title
,
object_type
,
initial
,
permission
)
self
.
_setObject
(
id
,
i
)
factory
=
self
.
_getOb
(
id
)
factory
.
initializePermission
()
if
REQUEST
is
not
None
:
return
self
.
manage_main
(
self
,
REQUEST
,
update_menu
=
1
)
...
...
lib/python/ZClasses/Method.py
View file @
eee81411
...
...
@@ -126,6 +126,8 @@ class ZClassMethodsSheet(
' '
i
=
App
.
Factory
.
Factory
(
id
,
title
,
object_type
,
initial
,
permission
)
self
.
_setObject
(
id
,
i
)
factory
=
self
.
_getOb
(
id
)
factory
.
initializePermission
()
if
REQUEST
is
not
None
:
return
self
.
manage_main
(
self
,
REQUEST
,
update_menu
=
1
)
...
...
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