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
a4485bbd
Commit
a4485bbd
authored
Jul 10, 2012
by
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- use the same base class for __call__ and other attributes
parent
b98ab71f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
src/Products/Five/browser/metaconfigure.py
src/Products/Five/browser/metaconfigure.py
+3
-3
src/Products/Five/browser/tests/pages_ftest.txt
src/Products/Five/browser/tests/pages_ftest.txt
+1
-1
No files found.
src/Products/Five/browser/metaconfigure.py
View file @
a4485bbd
...
...
@@ -129,7 +129,7 @@ def page(_context, name, permission, for_=Interface,
# we're supposed to make a page for an attribute (read:
# method) and it's not __call__. We thus need to create a
# new class using our mixin for attributes.
cdict
.
update
({
'__page_attribute__'
:
attribute
})
cdict
[
'__page_attribute__'
]
=
attribute
new_class
=
makeClass
(
class_
.
__name__
,
(
class_
,
simple
),
cdict
)
# in case the attribute does not provide a docstring,
...
...
@@ -149,8 +149,8 @@ def page(_context, name, permission, for_=Interface,
# some security declarations on it so we really shouldn't
# modify the original. So, instead we make a new class
# with just one base class -- the original
new_class
=
makeClass
(
class_
.
__name__
,
(
class_
,
BrowserView
),
cdict
)
cdict
[
'__page_attribute__'
]
=
attribute
new_class
=
makeClass
(
class_
.
__name__
,
(
class_
,
simple
),
cdict
)
else
:
# template
...
...
src/Products/Five/browser/tests/pages_ftest.txt
View file @
a4485bbd
...
...
@@ -86,7 +86,7 @@ accessible TTW, even if we have the permission to render the view:
>>> response = self.publish('/test_folder_1_/testoid/eagle.method/mouse',
... basic='viewer:secret')
>>> self.assertEqual(response.getStatus(), 40
1
)
>>> self.assertEqual(response.getStatus(), 40
4
)
The same should apply for the user if he has all other permissions
except 'View management screens':
...
...
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