SmartInc-API / role_access.py
yoursdvniel's picture
Create role_access.py
9bbce43 verified
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(), [])