yoursdvniel commited on
Commit
9bbce43
·
verified ·
1 Parent(s): ae6ef27

Create role_access.py

Browse files
Files changed (1) hide show
  1. role_access.py +9 -0
role_access.py ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ ROLE_COLLECTION_ACCESS = {
2
+ "operations": ["applications", "participants", "assignedInterventions", "kpiEntries"],
3
+ "director": ["participants", "interventionsDatabase", "kpiEntries"],
4
+ "consultant": ["assignedInterventions", "feedbacks"],
5
+ "incubatee": ["applications", "assignedInterventions", "feedbacks"]
6
+ }
7
+
8
+ def get_allowed_collections(role):
9
+ return ROLE_COLLECTION_ACCESS.get(role.lower(), [])