src/pyams_security/__init__.py
changeset 42 07229ac2497b
parent 41 905e30f5467b
child 54 59683c264d94
--- a/src/pyams_security/__init__.py	Wed May 20 12:31:27 2015 +0200
+++ b/src/pyams_security/__init__.py	Wed Jun 17 09:59:18 2015 +0200
@@ -40,6 +40,14 @@
     config.register_permission({'id': 'system.manage',
                                 'title': _("Manage system properties")})
 
+    config.register_permission({'id': 'security.manage',
+                                'title': _("Manage security")})
+    config.register_permission({'id': 'security.manage_roles',
+                                'title': _("Manage roles")})
+
+    # register custom roles
     config.register_role({'id': 'system.Manager',
                           'title': "System manager (role)",
-                          'permissions': {'public', 'view', 'manage', 'system.manage', 'system.view'}})
+                          'permissions': {'public', 'view', 'manage', 'system.manage', 'system.view',
+                                          'security.manage', 'security.manage_roles'},
+                          'managers': {'system:admin', 'role:system.Manager'}})