Spaces:
Sleeping
Sleeping
Create role_access.py
Browse files- 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(), [])
|