ScoDoc-Lille/app/scodoc/sco_roles_default.py

64 lines
1.7 KiB
Python
Raw Permalink Normal View History

2021-05-29 18:22:51 +02:00
# -*- mode: python -*-
# -*- coding: utf-8 -*-
"""Definition of ScoDoc default roles
"""
from app.scodoc.sco_permissions import Permission as p
2021-05-29 18:22:51 +02:00
SCO_ROLES_DEFAULTS = {
"Observateur": (p.ScoObservateur,),
"Ens": (
p.ScoObservateur,
p.ScoView,
p.ScoEnsView,
p.ScoUsersView,
p.ScoEtudAddAnnotations,
p.ScoAbsChange,
p.ScoAbsAddBillet,
p.ScoEntrepriseView,
),
"Secr": (
p.ScoObservateur,
p.ScoView,
p.ScoUsersView,
p.ScoEtudAddAnnotations,
p.ScoAbsChange,
p.ScoAbsAddBillet,
p.ScoEntrepriseView,
p.ScoEntrepriseChange,
p.ScoEtudChangeAdr,
),
# Admin est le chef du département, pas le "super admin"
# on doit donc lister toutes ses permissions:
2021-05-29 18:22:51 +02:00
"Admin": (
p.ScoObservateur,
p.ScoView,
p.ScoEnsView,
p.ScoUsersView,
p.ScoEtudAddAnnotations,
p.ScoAbsChange,
p.ScoAbsAddBillet,
p.ScoEntrepriseView,
p.ScoEntrepriseChange,
p.ScoEtudChangeAdr,
p.ScoChangeFormation,
p.ScoEditFormationTags,
p.ScoEditAllNotes,
p.ScoEditAllEvals,
p.ScoImplement,
p.ScoEtudChangeGroups,
p.ScoEtudInscrit,
p.ScoUsersAdmin,
p.ScoChangePreferences,
),
# RespPE est le responsable poursuites d'études
# il peut ajouter des tags sur les formations:
# (doit avoir un rôle Ens en plus !)
"RespPe": (p.ScoEditFormationTags,),
2021-05-29 18:22:51 +02:00
# Super Admin est un root: création/suppression de départements
# _tous_ les droits
# Afin d'avoir tous les droits, il ne doit pas être asscoié à un département
2021-05-29 18:22:51 +02:00
"SuperAdmin": p.ALL_PERMISSIONS,
}