med/README.md

2.7 KiB

Site de la Mediatek

License: GPL v3 pipeline status coverage report

Le projet Med permet la gestion de la base de donnée de la médiathèque de l'ENS Paris-Saclay. Elle permet de gérer les medias, bd, jeux, emprunts, ainsi que les adhérents de la med.

Licence

Ce projet est sous la licence GNU public license v3.0.

Développement

Après avoir installé un environnement Django,

./manage.py migrate
./manage.py collectstatic
./manage.py runserver

Configuration d'une base MySQL

Sur le serveur mysql ou postgresl, il est nécessaire de créer une base de donnée med, ainsi qu'un user med et un mot de passe associé.

Voici les étapes à éxecuter pour mysql :

CREATE DATABASE med;
CREATE USER 'med'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON med.* TO 'med'@'localhost';
FLUSH PRIVILEGES;

Et pour postgresql :

CREATE DATABASE med;
CREATE USER med WITH PASSWORD 'password';
GRANT ALL PRIVILEGES ON DATABASE med TO med;

Exemple de groupes de droits

bureau
    media | Can view borrowed item
    media | Can add borrowed item
    media | Can change borrowed item
    media | Can delete borrowed item
    users | Can view adhesion
    users | Can add adhesion
    users | Can change adhesion
    users | Can delete adhesion
    users | Can view clef
    users | Can add clef
    users | Can change clef
    users | Can delete clef
    users | Can view user
    users | Can add user
    users | Can change user
    sporz | Can view gamesave
    + permissions keyholder

keyholder
    media | Can view author
    media | Can add author
    media | Can change author
    media | Can delete author
    media | Can view medium
    media | Can add medium
    media | Can change medium
    media | Can delete medium
    media | Can view game
    media | Can add game
    media | Can change game
    media | Can delete game
    media | Can view borrowed item
    media | Can add borrowed item
    media | Can change borrowed item
    media | Can delete borrowed item
    users | Can view user
    users | Can view clef

users (default group for everyone)
    media | Can view author
    media | Can view game
    media | Can view medium
    sporz | Can add gamesave
    sporz | Can change gamesave
    sporz | Can add player
    sporz | Can change player
    sporz | Can delete player
    sporz | Can view player