MonScoDocEssai/sco_permissions.py

76 lines
2.8 KiB
Python
Raw Normal View History

2020-09-26 16:19:37 +02:00
# -*- mode: python -*-
# -*- coding: utf-8 -*-
"""Definitions of Zope permissions used by ScoDoc"""
# prefix all permissions by "Sco" to group them in Zope management tab
# Attention: si on change ces valeurs, il faut verifier les codes
# DTML qui utilisent directement les chaines de caractères...
ScoChangeFormation = "Sco Change Formation"
ScoEditAllNotes = "Sco Modifier toutes notes"
ScoEditAllEvals = "Sco Modifier toutes les evaluations"
ScoImplement = "Sco Implement Formation"
ScoAbsChange = "Sco Change Absences"
ScoAbsAddBillet = (
"Sco Add Abs Billet" # ajouter un billet d'absence via AddBilletAbsence
)
ScoEtudChangeAdr = "Sco Change Etud Address" # changer adresse/photo ou pour envoyer bulletins par mail ou pour debouche
ScoEtudChangeGroups = "Sco Change Etud Groups"
ScoEtudInscrit = "Sco Inscrire Etud" # aussi pour demissions, diplomes
ScoEtudAddAnnotations = "Sco Etud Add Annotations" # aussi pour archives
ScoEtudSupprAnnotations = "Sco Etud Suppr Annotations" # XXX inutile: utiliser Add !
ScoEntrepriseView = "Sco View Entreprises"
ScoEntrepriseChange = "Sco Change Entreprises"
ScoEditPVJury = "Sco Edit PV Jury"
ScoEditApo = ScoEtudChangeAdr # ajouter maquettes Apogee (=> chef dept et secr)
ScoEditFormationTags = (
"Sco Tagguer les formations" # mettre/modifier des tags sur les modules
)
ScoView = "Sco View"
ScoEnsView = "Sco View Ens" # parties visibles par enseignants slt
ScoObservateur = "Sco Observateur" # accès lecture restreint aux bulletins
2020-09-26 16:19:37 +02:00
ScoUsersAdmin = "Sco Users Manage"
ScoUsersView = "Sco Users View"
ScoChangePreferences = "Sco Change Preferences"
ScoSuperAdmin = "Sco Super Admin"
# ScoSuperAdmin est utilisé pour:
# - ZScoDoc: add/delete departments
# - tous rôles lors creation utilisateurs
#
# Default permissions for default roles
# (set once on instance creation):
Sco_Default_Permissions = {
ScoObservateur: ("Ens", "Secr", "Admin", "RespPe"),
2020-09-26 16:19:37 +02:00
ScoView: ("Ens", "Secr", "Admin", "RespPe"),
ScoEnsView: ("Ens", "Admin", "RespPe"),
ScoUsersView: ("Ens", "Secr", "Admin", "RespPe"),
ScoEtudAddAnnotations: ("Ens", "Secr", "Admin", "RespPe"),
ScoEtudSupprAnnotations: ("Admin",),
ScoAbsChange: ("Ens", "Secr", "Admin", "RespPe"),
ScoAbsAddBillet: ("Ens", "Secr", "Admin", "RespPe"),
ScoEntrepriseView: ("Ens", "Secr", "Admin", "RespPe"),
ScoEntrepriseChange: ("Secr", "Admin"),
ScoEtudChangeAdr: ("Secr", "Admin"), # utilisé aussi pour pv jury secretariats
ScoChangeFormation: ("Admin",),
ScoEditFormationTags: ("Admin", "RespPe"),
ScoEditAllNotes: ("Admin",),
ScoEditAllEvals: ("Admin",),
ScoImplement: ("Admin",),
ScoEtudChangeGroups: ("Admin",),
ScoEtudInscrit: ("Admin",),
ScoUsersAdmin: ("Admin",),
ScoChangePreferences: ("Admin",),
ScoSuperAdmin: (), # lister tt les permissions
}