|
1 | | -# ===== ACTION GROUPING (g2) ===== |
| 1 | +# Policies for roles - format: p = subject(role), action, scope, effect |
| 2 | +# Library Admin Role Policies |
| 3 | +p, role:library_admin, act:delete_library, library:*, allow |
| 4 | +p, role:library_admin, act:publish_library, library:*, allow |
| 5 | +p, role:library_admin, act:manage_library_team, library:*, allow |
| 6 | +p, role:library_admin, act:manage_library_tags, library:*, allow |
| 7 | +p, role:library_admin, act:delete_library_content, library:*, allow |
| 8 | +p, role:library_admin, act:publish_library_content, library:*, allow |
| 9 | +p, role:library_admin, act:delete_library_collection, library:*, allow |
| 10 | +p, role:library_admin, act:create_library, library:*, allow |
| 11 | +p, role:library_admin, act:create_library_collection, library:*, allow |
2 | 12 |
|
3 | | -# manage implies edit, delete, read, write |
4 | | -g2, act:manage, act:edit |
5 | | -g2, act:manage, act:delete |
6 | | -g2, act:edit, act:read |
7 | | -g2, act:edit, act:write |
| 13 | +# Library Author Role Policies |
| 14 | +p, role:library_author, act:delete_library_content, library:*, allow |
| 15 | +p, role:library_author, act:publish_library_content, library:*, allow |
| 16 | +p, role:library_author, act:edit_library, library:*, allow |
| 17 | +p, role:library_author, act:manage_library_tags, library:*, allow |
| 18 | +p, role:library_author, act:create_library_collection, library:*, allow |
| 19 | +p, role:library_author, act:edit_library_collection, library:*, allow |
| 20 | +p, role:library_author, act:delete_library_collection, library:*, allow |
8 | 21 |
|
9 | | -# edit implies read, write |
10 | | -g2, act:edit, act:read |
11 | | -g2, act:edit, act:write |
| 22 | +# Library Collaborator Role Policies |
| 23 | +p, role:library_collaborator, act:edit_library, library:*, allow |
| 24 | +p, role:library_collaborator, act:delete_library_content, library:*, allow |
| 25 | +p, role:library_collaborator, act:manage_library_tags, library:*, allow |
| 26 | +p, role:library_collaborator, act:create_library_collection, library:*, allow |
| 27 | +p, role:library_collaborator, act:edit_library_collection, library:*, allow |
| 28 | +p, role:library_collaborator, act:delete_library_collection, library:*, allow |
| 29 | + |
| 30 | +# Library User Role Policies |
| 31 | +p, role:library_user, act:view_library, library:*, allow |
| 32 | +p, role:library_user, act:view_library_team, library:*, allow |
| 33 | +p, role:library_user, act:reuse_library_content, library:*, allow |
| 34 | + |
| 35 | +# User-to-Role assignments (g) - format: g = user, role, scope |
| 36 | +# These would be populated dynamically based on actual user assignments |
| 37 | +g, user:alice_admin, role:library_admin, library:math_101 |
| 38 | +g, user:bob_author, role:library_author, library:history_201 |
| 39 | +g, user:carol_collaborator, role:library_collaborator, library:science_301 |
| 40 | +g, user:dave_user, role:library_user, library:english_101 |
| 41 | +g, user:eve_multi, role:library_admin, library:physics_401 |
| 42 | +g, user:eve_multi, role:library_author, library:chemistry_501 |
| 43 | +g, user:frank_global, role:library_user, * |
| 44 | + |
| 45 | +# Action Inheritance (g2) - format: g2 = parent_action, child_action |
| 46 | +# The logical inheritance hierarchy for actions |
| 47 | +g2, act:edit_library, act:delete_library |
| 48 | +g2, act:view_library, act:edit_library |
| 49 | +g2, act:edit_library, act:create_library |
| 50 | +g2, act:view_library, act:publish_library |
| 51 | +g2, act:view_library_team, act:manage_library_team |
| 52 | +g2, act:view_library_tags, act:manage_library_tags |
| 53 | +g2, act:edit_library_collection, act:delete_library_collection |
| 54 | +g2, act:view_library_collection, act:edit_library_collection |
| 55 | +g2, act:edit_library_collection, act:create_library_collection |
| 56 | +g2, act:view_library_content, act:edit_library_content |
| 57 | +g2, act:edit_library_content, act:delete_library_content |
| 58 | +g2, act:view_library_content, act:publish_library_content |
| 59 | +g2, act:view_library_content, act:reuse_library_content |
0 commit comments