Added names permissions
authorThierry Florac <thierry.florac@onf.fr>
Wed, 07 Oct 2015 17:44:23 +0200
changeset 44 2676f46ef999
parent 43 e74e5360db32
child 45 e5252c302dbf
Added names permissions
src/pyams_utils/interfaces/__init__.py
--- a/src/pyams_utils/interfaces/__init__.py	Thu Aug 27 11:29:09 2015 +0200
+++ b/src/pyams_utils/interfaces/__init__.py	Wed Oct 07 17:44:23 2015 +0200
@@ -20,6 +20,36 @@
 # import packages
 
 
+#
+# Custom string constants
+#
+
+# Custom permission which is never granted to any user
+FORBIDDEN_PERMISSION = 'system.forbidden'
+
+# public permission is granted to every principal
+PUBLIC_PERMISSION = 'public'
+
+# view permission is a custom permission used to view contents
+VIEW_PERMISSION = 'view'
+
+# permission used to manage basic informations
+# this permission is generally not used by custom contents
+MANAGE_PERMISSION = 'manage'
+
+# permission used to access management screens
+VIEW_SYSTEM_PERMISSION = 'system.view'
+
+# permission used to manage system settings
+MANAGE_SYSTEM_PERMISSION = 'system.manage'
+
+# permission used to manage security settings
+MANAGE_SECURITY_PERMISSION = 'security.manage'
+
+# permission used to manage roles
+MANAGE_ROLES_PERMISSION = 'security.manage_roles'
+
+
 # ZODB application name settings key
 PYAMS_APPLICATION_SETTINGS_KEY = 'pyams.application_name'