Skip to content

Commit

Permalink
- use the same base class for __call__ and other attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
Unknown committed Jul 10, 2012
1 parent b98ab71 commit a4485bb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/Products/Five/browser/metaconfigure.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/Products/Five/browser/tests/pages_ftest.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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(), 401)
>>> self.assertEqual(response.getStatus(), 404)

The same should apply for the user if he has all other permissions
except 'View management screens':
Expand Down

0 comments on commit a4485bb

Please sign in to comment.