--- a/src/pyams_thesaurus/__init__.py Tue Jul 18 10:55:10 2017 +0200
+++ b/src/pyams_thesaurus/__init__.py Mon Sep 11 14:18:46 2017 +0200
@@ -16,8 +16,8 @@
from pyramid.i18n import TranslationStringFactory
_ = TranslationStringFactory('pyams_thesaurus')
-from pyams_thesaurus.interfaces import ADMIN_THESAURUS_PERMISSION, MANAGE_THESAURUS_CONTENT_PERMISSION, \
- MANAGE_THESAURUS_EXTRACT_PERMISSION
+from pyams_thesaurus.interfaces import CREATE_THESAURUS_PERMISSION, ADMIN_THESAURUS_PERMISSION, \
+ MANAGE_THESAURUS_CONTENT_PERMISSION, MANAGE_THESAURUS_EXTRACT_PERMISSION
from pyams_utils.interfaces import VIEW_PERMISSION, VIEW_SYSTEM_PERMISSION
@@ -28,6 +28,8 @@
include_package(config)
# register custom permissions
+ config.register_permission({'id': CREATE_THESAURUS_PERMISSION,
+ 'title': _("Create thesaurus")})
config.register_permission({'id': ADMIN_THESAURUS_PERMISSION,
'title': _("Manage thesaurus properties")})
config.register_permission({'id': MANAGE_THESAURUS_CONTENT_PERMISSION,
--- a/src/pyams_thesaurus/interfaces/__init__.py Tue Jul 18 10:55:10 2017 +0200
+++ b/src/pyams_thesaurus/interfaces/__init__.py Mon Sep 11 14:18:46 2017 +0200
@@ -20,6 +20,14 @@
# import packages
-ADMIN_THESAURUS_PERMISSION = 'thesaurus.admin'
-MANAGE_THESAURUS_CONTENT_PERMISSION = 'thesaurus.manage'
-MANAGE_THESAURUS_EXTRACT_PERMISSION = 'thesaurus.extract.manage'
+CREATE_THESAURUS_PERMISSION = 'pyams.CreateThesaurus'
+'''Permission to create thesaurus'''
+
+ADMIN_THESAURUS_PERMISSION = 'pyams.AdminThesaurus'
+'''Permission to administer all thesaurus properties'''
+
+MANAGE_THESAURUS_CONTENT_PERMISSION = 'pyams.ManageThesaurusContent'
+'''Permission to manage thesaurus contents'''
+
+MANAGE_THESAURUS_EXTRACT_PERMISSION = 'pyams.ManageThesaurusExtract'
+'''Permission to manage thesaurus extract contents'''