Commit a4485bbd authored by 's avatar

- use the same base class for __call__ and other attributes

parent b98ab71f
...@@ -129,7 +129,7 @@ def page(_context, name, permission, for_=Interface, ...@@ -129,7 +129,7 @@ def page(_context, name, permission, for_=Interface,
# we're supposed to make a page for an attribute (read: # we're supposed to make a page for an attribute (read:
# method) and it's not __call__. We thus need to create a # method) and it's not __call__. We thus need to create a
# new class using our mixin for attributes. # new class using our mixin for attributes.
cdict.update({'__page_attribute__': attribute}) cdict['__page_attribute__'] = attribute
new_class = makeClass(class_.__name__, (class_, simple), cdict) new_class = makeClass(class_.__name__, (class_, simple), cdict)
# in case the attribute does not provide a docstring, # in case the attribute does not provide a docstring,
...@@ -149,8 +149,8 @@ def page(_context, name, permission, for_=Interface, ...@@ -149,8 +149,8 @@ def page(_context, name, permission, for_=Interface,
# some security declarations on it so we really shouldn't # some security declarations on it so we really shouldn't
# modify the original. So, instead we make a new class # modify the original. So, instead we make a new class
# with just one base class -- the original # with just one base class -- the original
new_class = makeClass(class_.__name__, cdict['__page_attribute__'] = attribute
(class_, BrowserView), cdict) new_class = makeClass(class_.__name__, (class_, simple), cdict)
else: else:
# template # template
......
...@@ -86,7 +86,7 @@ accessible TTW, even if we have the permission to render the view: ...@@ -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', >>> response = self.publish('/test_folder_1_/testoid/eagle.method/mouse',
... basic='viewer:secret') ... 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 The same should apply for the user if he has all other permissions
except 'View management screens': except 'View management screens':
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment