58 lines
1.4 KiB
Python
58 lines
1.4 KiB
Python
|
# -*- mode: python -*-
|
||
|
# -*- coding: utf-8 -*-
|
||
|
|
||
|
"""Definition of ScoDoc default roles
|
||
|
"""
|
||
|
|
||
|
from sco_permissions import Permission as p
|
||
|
|
||
|
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 dit donc lister toutes ses permissions:
|
||
|
"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,
|
||
|
),
|
||
|
# Super Admin est un root: création/suppression de départements
|
||
|
# _tous_ les droits
|
||
|
"SuperAdmin": p.ALL_PERMISSIONS,
|
||
|
}
|