Spaces:
Running
Running
Download role_access.py from yoursdvniel/SmartInc-API: direct link, hf CLI and curl.
- Browser
- Download file 415 Bytes
-
https://huggingface.co/spaces/yoursdvniel/SmartInc-API/resolve/main/role_access.py
- Command line
-
hf download hf://spaces/yoursdvniel/SmartInc-API/role_access.py
-
curl -L -o role_access.py https://huggingface.co/spaces/yoursdvniel/SmartInc-API/resolve/main/role_access.py
415 Bytes
| ROLE_COLLECTION_ACCESS = { | |
| "operations": ["applications", "participants", "assignedInterventions", "kpiEntries"], | |
| "director": ["participants", "interventionsDatabase", "kpiEntries"], | |
| "consultant": ["assignedInterventions", "feedbacks"], | |
| "incubatee": ["applications", "assignedInterventions", "feedbacks"] | |
| } | |
| def get_allowed_collections(role): | |
| return ROLE_COLLECTION_ACCESS.get(role.lower(), []) | |