Skip to content

Commit

Permalink
Explicitly require Manager role for AltDatabaseManager.
Browse files Browse the repository at this point in the history
If you use experimental.publishtraverse and try to call manage_pack,
it warns that the object (the manage_pack function) has no roles.
In strict mode it will fail.
This is an indication that the function *might* be available for anonymous users.
That is not the case here, but being strict seems good.
  • Loading branch information
mauritsvanrees committed May 10, 2017
1 parent d869368 commit c6fcf3e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions doc/CHANGES.rst
Expand Up @@ -8,6 +8,7 @@ http://docs.zope.org/zope2/
2.13.27 (unreleased)
--------------------

- Explicitly require Manager role for ``AltDatabaseManager``. [maurits]


2.13.26 (2017-02-20)
Expand Down
1 change: 1 addition & 0 deletions src/App/ApplicationManager.py
Expand Up @@ -482,6 +482,7 @@ def objectIds(self, spec=None):
class AltDatabaseManager(DatabaseManager, CacheManager):
""" Database management DBTab-style
"""
__roles__ = ('Manager', )
db_name = ApplicationManager.db_name.im_func
db_size = ApplicationManager.db_size.im_func
manage_pack = ApplicationManager.manage_pack.im_func
Expand Down

0 comments on commit c6fcf3e

Please sign in to comment.