165 Commits

Author SHA1 Message Date
41dcb84987 Merge branch 'main' into feature/suppression_reservation
All checks were successful
Organisation/sirh/pipeline/pr-main This commit looks good
2026-10-08 12:43:44 +00:00
Soriba SYLLA
0abbb26149 Fix/Correction affectation departement
Some checks failed
Organisation/sirh/pipeline/head There was a failure building this commit
2026-10-07 10:30:08 +00:00
9fb079c9a7 Ajout de la suppression de la reservation de salle
Some checks failed
Organisation/sirh/pipeline/head There was a failure building this commit
Organisation/sirh/pipeline/pr-main There was a failure building this commit
2026-10-07 09:42:34 +00:00
f061f482d9 Feat: Hierarchisation des validations des demandes de reservation
All checks were successful
Organisation/sirh/pipeline/head This commit looks good
2026-09-15 12:46:19 +00:00
622b412a21 Fix: Permettre à un utilisateur d'annuler sa reservation
All checks were successful
Organisation/sirh/pipeline/head This commit looks good
2026-09-14 11:17:01 +00:00
54dc65f0d8 Feat: Envoie de mail à l'équipe informatique après reservation de salle necessitant un lien zoom ou ordinateur
All checks were successful
Organisation/sirh/pipeline/head This commit looks good
2026-09-14 10:42:12 +00:00
Fatimac2804
29a42ee6be feat:Ajout notification email équipe informatique
All checks were successful
Organisation/sirh/pipeline/head This commit looks good
Organisation/sirh/pipeline/pr-main This commit looks good
2026-09-10 12:23:45 +02:00
904954c735 Fix: Modification de mot de passe
All checks were successful
Organisation/sirh/pipeline/head This commit looks good
2026-09-08 11:09:53 +00:00
99e764ab4d Merge branch 'main' of https://jenkins.cerfig.org/CERFIG/sirh 2026-09-07 12:10:34 +00:00
0eb745d5f3 Fix: Correction de l'affichage des dates dans les détails de la réservation 2026-09-07 12:07:58 +00:00
097648c03e Fix: Correction de l'affichage des dates dans les détails de la réservation
All checks were successful
Organisation/sirh/pipeline/head This commit looks good
2026-09-07 11:33:21 +00:00
1a21998c39 Ajout de la barre de navigation
All checks were successful
Organisation/sirh/pipeline/head This commit looks good
SGL/sirh/pipeline/head This commit looks good
2026-09-04 12:19:27 +00:00
900343a4f8 Merge branch 'main' of https://jenkins.cerfig.org/CERFIG/sirh 2026-09-03 14:34:09 +00:00
3c5c58b5d1 Mise a jour: Integration de toutes les suggestions passées 2026-09-03 14:08:01 +00:00
Fatimac2804
3b587d2a1a Affichage des detait de la reservation de salle
All checks were successful
Organisation/sirh/pipeline/head This commit looks good
2026-09-02 13:46:07 +02:00
Fatimac2804
e3f0befff6 Correction sur l'afficha de la liste de departement pour la modification des informations de l'employer
All checks were successful
Organisation/sirh/pipeline/head This commit looks good
2026-09-02 12:48:35 +02:00
8b9e73f83b Bug: Correction du refus des reservations et d'envoi de mail
All checks were successful
SGL/sirh/pipeline/head This commit looks good
Organisation/sirh/pipeline/head This commit looks good
2026-09-01 10:04:09 +00:00
8f822fbe85 Bug: Validation de reservation 2026-09-01 09:59:50 +00:00
411f2c43e3 Bug: Affichage des details de la reservation 2026-09-01 09:49:39 +00:00
7826f517f5 Bug : Affichages des conges 2026-08-31 16:02:54 +00:00
0936d6ad02 Bug : Affichage des demandes de conges 2026-08-31 15:54:05 +00:00
472774d78c Bug: Details des reservations 2026-08-31 15:48:22 +00:00
d5a0f1104e Gestion de l'envoie des mails 2026-08-31 15:46:29 +00:00
b9d6ab1186 Verification du statut avant la creation d'un contrat 2026-08-31 15:41:45 +00:00
620a01ec27 clean: remove pycache from tracking 2026-08-31 15:26:41 +00:00
f672b9e9ba Prise en charge de la photo de profil 2026-08-31 15:18:36 +00:00
7b3ba53e97 Ajout de la prise en charge des photos de profil 2026-08-31 15:17:38 +00:00
cb4470e481 clean: remove pycache from tracking 2026-08-31 14:46:54 +00:00
dfb262809a Ajout de dependance 2026-08-31 14:42:26 +00:00
8f91a0ec87 Config env 2026-08-31 14:41:28 +00:00
Soriba SYLLA
65ecef52b5 Ajout du contexte processor 2026-08-31 14:26:02 +00:00
13e9d7dd19 Correction: Affichage detail reservation 2026-08-31 14:26:02 +00:00
88de14aabc Implementation de sso 2026-08-31 14:26:02 +00:00
0576443f02 Supprimer gestion_salle/migrations/0001_initial.py 2026-08-31 14:26:02 +00:00
e306b1d67d Supprimer gestion_projet/migrations/0001_initial.py 2026-08-31 14:26:02 +00:00
f4663c6429 Supprimer gestion_employe/migrations/0001_initial.py 2026-08-31 14:26:02 +00:00
6497d5ce90 Supprimer gestion_conge/migrations/0001_initial.py 2026-08-31 14:26:02 +00:00
a10d52e2df Correction enregistrement profil 2026-08-31 14:25:59 +00:00
2a3a330d38 Affichage de la liste des contrat d'un employé 2026-08-31 14:25:13 +00:00
b4fb5bbd91 Correction sur l'affichage des detail de la reservation 2026-08-31 14:25:13 +00:00
098097ea54 Correction modification profil employé 2026-08-31 14:25:13 +00:00
3abdf9ad6f Filtrage des reservations par salle 2026-08-31 14:25:13 +00:00
4338204f48 Bug: Correction du refus des reservations et d'envoi de mail 2026-08-31 14:25:11 +00:00
ac4e21c336 Bug: Validation des conges 2026-08-31 14:22:38 +00:00
c51ea4d334 Bug: Validation des conges 2026-08-31 14:22:34 +00:00
b88a251694 Correction Bug : Validation 2026-08-31 14:20:11 +00:00
15b48d3db6 Bug: Validation de reservation 2026-08-31 14:20:11 +00:00
c69cf6c8f3 feature: Affichage de tous les detail de la resevation 2026-08-31 14:20:11 +00:00
8456a39226 feature: Affichage du message sur l'tat du contrat 2026-08-31 14:20:11 +00:00
bb4d47c6b1 feature: Affichage des details de la reservation 2026-08-31 14:20:11 +00:00
d721af865a Fonctionnalite : Ajout de la liste des contrats 2026-08-31 14:20:08 +00:00
fd74c06251 Fonctionnalite: Ajout des contrats 2026-08-31 13:25:53 +00:00
be357aefa5 Bug: Affichage de la lite des conges en fonction des profil 2026-08-31 13:25:51 +00:00
e06ee9a434 Bug: Affichage des details de la reservation 2026-08-31 13:24:36 +00:00
a89fdd7216 Bug : Affichages des conges 2026-08-31 13:19:46 +00:00
955083da2b Bug : Affichage des demandes de conges 2026-08-31 13:11:37 +00:00
f6715d62d3 Bug: Details des reservations 2026-08-31 13:02:12 +00:00
17f0b4f8dc Gestion de l'envoie des mails 2026-08-31 13:00:12 +00:00
e5309927a5 Fonctionnalite: verifier qu'aucun contrat n'est actif avant la creation d'un nouveau pour un employe 2026-08-31 12:58:07 +00:00
16b4489088 Verification du statut avant la creation d'un contrat 2026-08-31 12:55:00 +00:00
117bbe255b clean: suppression de pycache du tracking 2026-08-31 12:17:42 +00:00
c35cfc50d4 Prise en charge de la photo de profil 2026-08-31 12:17:23 +00:00
d464d19981 Prise en charge de la photo de profil 2026-08-31 12:16:32 +00:00
f7ce6065ac Prise en charge de la photo de profil 2026-08-31 12:16:32 +00:00
9a44d5440a Prise en charge de la photo de profil 2026-08-31 12:16:32 +00:00
cad7c94541 Ajout de la prise en charge des photos de profil 2026-08-31 12:16:23 +00:00
ef86e03c37 clean: suppression de pycache du tracking 2026-08-31 12:15:23 +00:00
c14170caef Finalisation du Jenkinsfile 2026-08-31 12:13:43 +00:00
559158257e Deploiement automatique 2026-08-31 12:13:43 +00:00
a916e12584 Ajout de dependance 2026-08-31 12:13:43 +00:00
63543143c5 Config des environnement 2026-08-31 12:13:43 +00:00
12b0390306 Config env 2026-08-31 12:13:34 +00:00
8478262c80 Derniere modification du Jenkinsfile 2026-08-31 12:11:21 +00:00
078f164c8b utilisation des credentials 2026-08-31 12:11:21 +00:00
39d9dc810f pipeline9 2026-08-31 12:11:21 +00:00
b14ec02434 pipeline 8 2026-08-31 12:11:21 +00:00
6bb978ab7e pipeline 7 2026-08-31 12:11:21 +00:00
81e8fa3901 pipeline 6 2026-08-31 12:11:20 +00:00
2948f12b89 pipeline 5 2026-08-31 12:11:20 +00:00
b88a21dc5d pipeline 4 2026-08-31 12:11:20 +00:00
486ba88885 pipeline3 2026-08-31 12:11:20 +00:00
5fcc163dae pipeline 2 2026-08-31 12:11:20 +00:00
6857c8b4ac Pipeline 1 2026-08-31 12:11:20 +00:00
31389e677e Test pipeline 2026-08-31 12:11:20 +00:00
500479fd46 Ajout de l'agent 2026-08-31 12:11:20 +00:00
b3ead5eb73 jenkins test 3 2026-08-31 12:11:20 +00:00
d9670dd1b3 renommage jenkinsfile 2026-08-31 12:11:20 +00:00
f65ac75710 Test jenkins 1 2026-08-31 12:11:20 +00:00
Soriba SYLLA
55e5a2819c Ajout du contexte processor
All checks were successful
Organisation/sirh/pipeline/head This commit looks good
2026-08-31 09:48:21 +00:00
Soriba SYLLA
7e28b25497 Merge branch 'staging' 2026-08-23 15:14:24 +00:00
643205a4bb Premiere implementation de sso
All checks were successful
Organisation/sirh/pipeline/head This commit looks good
2026-08-04 09:34:31 +00:00
4934b42ed9 Implementation de sso 2026-07-29 10:26:22 +00:00
f9ca539670 Supprimer gestion_salle/migrations/0001_initial.py
All checks were successful
Organisation/sirh/pipeline/head This commit looks good
2026-07-14 09:17:13 +00:00
7b4778252f Supprimer gestion_projet/migrations/0001_initial.py
Some checks failed
Organisation/sirh/pipeline/head There was a failure building this commit
2026-07-14 09:17:02 +00:00
2c086187e7 Supprimer gestion_employe/migrations/0001_initial.py
Some checks are pending
Organisation/sirh/pipeline/head Build queued...
2026-07-14 09:16:51 +00:00
5aff49600e Supprimer gestion_conge/migrations/0001_initial.py
Some checks failed
Organisation/sirh/pipeline/head There was a failure building this commit
2026-07-14 09:16:28 +00:00
8c6e59e15a Correction enregistrement profil
Some checks failed
Organisation/sirh/pipeline/head There was a failure building this commit
2026-07-14 09:03:28 +00:00
415860f233 Filtrage des reservations par salle
All checks were successful
Organisation/sirh/pipeline/head This commit looks good
2026-05-15 17:13:02 +00:00
8503689aa4 Bug: Correction du refus des reservations et d'envoi de mail
All checks were successful
Organisation/sirh/pipeline/head This commit looks good
2026-05-15 16:31:11 +00:00
b03a4214c0 Bug: Validation des conges
All checks were successful
Organisation/sirh/pipeline/head This commit looks good
2026-05-11 15:33:04 +00:00
d4f4b7d954 Bug: Validation des conges
Some checks failed
Organisation/sirh/pipeline/head There was a failure building this commit
2026-05-11 15:27:50 +00:00
489eeb439f Correction Bug : Validation 2026-05-11 14:46:59 +00:00
5277b7f355 Bug: Validation de reservation
All checks were successful
Organisation/sirh/pipeline/head This commit looks good
2026-05-11 13:20:13 +00:00
9d9e6c6549 Bug: Affichage de la lite des conges en fonction des profil
All checks were successful
Organisation/sirh/pipeline/head This commit looks good
2026-05-07 15:32:22 +00:00
784822478e feature: Affichage de la liste des bailleur 2026-05-07 15:28:52 +00:00
ab87baaa3a Bug: Affichage des details de la reservation 2026-05-07 15:28:42 +00:00
6026af5498 Bug : Affichages des conges 2026-05-07 15:23:47 +00:00
91bdd791f1 Bug : Affichage des demandes de conges 2026-05-07 15:11:25 +00:00
671072864d Bug: Details des reservations
All checks were successful
Organisation/sirh/pipeline/head This commit looks good
2026-05-07 14:44:16 +00:00
bb93a853db Gestion de l'envoie des mails
All checks were successful
Organisation/sirh/pipeline/head This commit looks good
2026-05-07 11:25:11 +00:00
99434a21e0 Fonctionnalite: verifier qu'aucun contrat n'est actif avant la creation d'un nouveau pour un employe
All checks were successful
Organisation/sirh/pipeline/head This commit looks good
2026-05-06 16:01:37 +00:00
f6b90e7dd0 Verification du statut avant la creation d'un contrat 2026-05-06 15:53:02 +00:00
fcfac71026 clean: remove pycache from tracking 2026-05-06 15:44:16 +00:00
34a261a4af Prise en charge de la photo de profil
All checks were successful
Organisation/sirh/pipeline/head This commit looks good
2026-05-06 12:25:38 +00:00
f0e8b025a4 Prise en charge de la photo de profil
Some checks failed
Organisation/sirh/pipeline/head There was a failure building this commit
2026-05-06 11:51:55 +00:00
62b2938c71 Prise en charge de la photo de profil
Some checks failed
Organisation/sirh/pipeline/head There was a failure building this commit
2026-05-06 11:43:54 +00:00
06125b0900 Prise en charge de la photo de profil
Some checks failed
Organisation/sirh/pipeline/head There was a failure building this commit
2026-05-06 11:31:49 +00:00
0047b1f91c Ajout de la prise en charge des photos de profil 2026-05-06 08:50:49 +00:00
7ee14e7b3f clean: remove pycache from tracking 2026-05-06 08:42:28 +00:00
d12b014b20 feature: ajout photo de profil 2026-05-05 15:57:35 +00:00
d9b45ac364 Merge pull request 'Finalisation du Jenkinsfile' (#37) from finalisation into main
All checks were successful
Organisation/sirh/pipeline/head This commit looks good
Reviewed-on: #37
2026-05-04 13:45:46 +00:00
44faeac222 Finalisation du Jenkinsfile
Some checks are pending
Organisation/sirh/pipeline/head This commit looks good
Organisation/sirh/pipeline/pr-main Build queued...
2026-05-04 13:44:41 +00:00
e1436e8f4e Merge pull request 'Deploiement automatique' (#36) from env2 into main
All checks were successful
Organisation/sirh/pipeline/head This commit looks good
Reviewed-on: #36
2026-05-04 13:16:38 +00:00
4ee7dd9fc7 Deploiement automatique
Some checks are pending
Organisation/sirh/pipeline/head This commit looks good
Organisation/sirh/pipeline/pr-main Build queued...
2026-05-04 13:15:38 +00:00
a9e708c778 Merge pull request 'Ajout de dependance' (#35) from env2 into main
All checks were successful
Organisation/sirh/pipeline/head This commit looks good
Reviewed-on: #35
2026-05-04 13:04:03 +00:00
e427561cc1 Ajout de dependance
Some checks are pending
Organisation/sirh/pipeline/head This commit looks good
Organisation/sirh/pipeline/pr-main Build queued...
2026-05-04 13:01:17 +00:00
78fafebc4d Merge pull request 'env1' (#34) from env1 into main
All checks were successful
Organisation/sirh/pipeline/head This commit looks good
Reviewed-on: #34
2026-05-04 12:39:23 +00:00
ecdaa9f9f9 Config des environnement
Some checks are pending
Organisation/sirh/pipeline/head This commit looks good
Organisation/sirh/pipeline/pr-main Build queued...
2026-05-04 12:38:33 +00:00
9951719b26 Config env 2026-05-04 12:22:15 +00:00
1391a5ea3b Derniere modification du Jenkinsfile
All checks were successful
Organisation/sirh/pipeline/head This commit looks good
Organisation/sirh/pipeline/pr-main This commit looks good
2026-05-04 09:58:34 +00:00
357b50dfa4 Merge pull request 'utilisation des credentials' (#32) from pipeline10 into main
All checks were successful
Organisation/sirh/pipeline/head This commit looks good
Reviewed-on: #32
2026-05-04 09:52:26 +00:00
bda80fae85 utilisation des credentials
Some checks are pending
Organisation/sirh/pipeline/head This commit looks good
Organisation/sirh/pipeline/pr-main Build queued...
2026-05-04 09:51:25 +00:00
9c1eb543ff Merge pull request 'pipeline9' (#31) from pipeline9 into main
All checks were successful
Organisation/sirh/pipeline/head This commit looks good
Reviewed-on: #31
2026-04-30 16:07:01 +00:00
f55b1a6f2d pipeline9
Some checks are pending
Organisation/sirh/pipeline/pr-main Build queued...
Organisation/sirh/pipeline/head This commit looks good
2026-04-30 16:06:21 +00:00
a6412341cf Merge pull request 'pipeline 8' (#30) from pipeline8 into main
Some checks failed
Organisation/sirh/pipeline/head There was a failure building this commit
Reviewed-on: #30
2026-04-30 15:59:17 +00:00
ab2d8b479c pipeline 8
All checks were successful
Organisation/sirh/pipeline/head This commit looks good
Organisation/sirh/pipeline/pr-main This commit looks good
2026-04-30 15:57:54 +00:00
8f412cb031 Merge pull request 'pipeline 7' (#29) from pipeline7 into main
Some checks failed
Organisation/sirh/pipeline/head There was a failure building this commit
Reviewed-on: #29
2026-04-30 15:44:04 +00:00
69764b74a2 pipeline 7
Some checks are pending
Organisation/sirh/pipeline/pr-main Build queued...
Organisation/sirh/pipeline/head Build started...
2026-04-30 15:43:00 +00:00
e1dc510af1 Merge pull request 'pipeline 6' (#28) from pipeline6 into main
Some checks failed
Organisation/sirh/pipeline/head There was a failure building this commit
Reviewed-on: #28
2026-04-30 15:28:19 +00:00
fa21850c6b pipeline 6
Some checks are pending
Organisation/sirh/pipeline/head This commit looks good
Organisation/sirh/pipeline/pr-main Build queued...
2026-04-30 15:27:29 +00:00
4a8cbf02b9 Merge pull request 'pipeline 5' (#27) from pipeline5 into main
Some checks failed
Organisation/sirh/pipeline/head There was a failure building this commit
Reviewed-on: #27
2026-04-30 15:21:29 +00:00
798784a163 pipeline 5
Some checks are pending
Organisation/sirh/pipeline/pr-main Build queued...
Organisation/sirh/pipeline/head This commit looks good
2026-04-30 15:21:02 +00:00
86ad99de76 Merge pull request 'pipeline 4' (#25) from pipeline4 into main
Some checks failed
Organisation/sirh/pipeline/head There was a failure building this commit
Reviewed-on: #25
2026-04-30 15:09:54 +00:00
5680677865 pipeline 4
Some checks are pending
Organisation/sirh/pipeline/pr-main Build queued...
Organisation/sirh/pipeline/head Build started...
2026-04-30 15:09:22 +00:00
886c3246af Merge pull request 'pipeline3' (#24) from pipeline3 into main
Some checks failed
Organisation/sirh/pipeline/head There was a failure building this commit
Reviewed-on: #24
2026-04-30 15:03:16 +00:00
7b66250832 pipeline3
Some checks are pending
Organisation/sirh/pipeline/head This commit looks good
Organisation/sirh/pipeline/pr-main Build queued...
2026-04-30 15:01:54 +00:00
80b3573674 Merge pull request 'pipeline 2' (#23) from pipeline2 into main
Some checks failed
Organisation/sirh/pipeline/head There was a failure building this commit
Reviewed-on: #23
2026-04-30 14:56:41 +00:00
efadd66483 pipeline 2
Some checks are pending
Organisation/sirh/pipeline/pr-main Build queued...
Organisation/sirh/pipeline/head Build started...
2026-04-30 14:56:06 +00:00
c9431063de Merge pull request 'Pipeline 1' (#22) from pipeline1 into main
Some checks failed
Organisation/sirh/pipeline/head There was a failure building this commit
Reviewed-on: #22
2026-04-30 14:51:42 +00:00
15c33efc14 Pipeline 1
Some checks failed
Organisation/sirh/pipeline/head There was a failure building this commit
Organisation/sirh/pipeline/pr-main Build queued...
2026-04-30 14:50:58 +00:00
5257901e75 Merge pull request 'Test pipeline' (#21) from jenkins_agent_exemple into main
Some checks failed
Organisation/sirh/pipeline/head There was a failure building this commit
Reviewed-on: #21
2026-04-30 14:47:05 +00:00
b3294a823e Test pipeline
Some checks failed
Organisation/sirh/pipeline/pr-main There was a failure building this commit
2026-04-30 14:45:35 +00:00
2a182830a6 Merge pull request 'Ajout de l'agent' (#20) from jenkins_agent into main
All checks were successful
Organisation/sirh/pipeline/head This commit looks good
Reviewed-on: #20
2026-04-30 13:18:30 +00:00
14631c3744 Ajout de l'agent
Some checks are pending
Organisation/sirh/pipeline/pr-main Build queued...
Organisation/sirh/pipeline/head This commit looks good
2026-04-30 13:17:43 +00:00
f0894bb66f Merge pull request 'jenkins test 3' (#18) from jenkins into main
Some checks failed
Organisation/sirh/pipeline/head There was a failure building this commit
Reviewed-on: #18
2026-04-30 13:12:06 +00:00
75285a140a jenkins test 3
Some checks failed
Organisation/sirh/pipeline/head There was a failure building this commit
Organisation/sirh/pipeline/pr-main There was a failure building this commit
2026-04-30 13:11:14 +00:00
3cc8e292b3 Merge pull request 'renommage jenkinsfile' (#16) from test_jenkins into main
Some checks failed
Organisation/sirh/pipeline/head There was a failure building this commit
Reviewed-on: #16
2026-04-30 13:02:50 +00:00
34d1464391 renommage jenkinsfile
Some checks failed
Organisation/sirh/pipeline/head There was a failure building this commit
Organisation/sirh/pipeline/pr-main There was a failure building this commit
2026-04-30 13:00:26 +00:00
6c12131fab Merge pull request 'Test jenkins 1' (#15) from test_jenkins into main
Reviewed-on: #15
2026-04-30 12:48:13 +00:00
19e4675f32 Test jenkins 1 2026-04-30 12:47:18 +00:00
741519c341 feature: Affichage de la liste des bailleur 2026-04-30 14:16:42 +02:00
48f069506a feature: Affichage des details de la reservation 2026-04-30 13:59:00 +02:00
3693ef29f9 feature: statut creation contrat 2026-04-30 13:33:39 +02:00
c28b14fb98 clean: remove pycache from tracking 2026-04-30 13:28:57 +02:00
29a93e9bfe clean: remove pycache from tracking 2026-04-30 13:28:53 +02:00
325 changed files with 1596 additions and 3224 deletions

9
.gitignore vendored
View File

@@ -1,3 +1,8 @@
venv/
media/
staticfiles/
.env
migrations/
__pycache__/
*.pyc
db.sqlite3
venv/*
media/*

51
Jenkinsfile vendored Normal file
View File

@@ -0,0 +1,51 @@
pipeline
{
agent any
options {
skipDefaultCheckout(true)
}
environment
{
SUDO_PASSWORD = credentials('sudo-password')
}
stages
{
stage ( 'checkout' )
{
steps
{
sh 'echo "Debut du pipeline test"'
cleanWs()
checkout scm
}
}
stage ( 'Deploiement' )
{
when { branch 'main' }
steps {
sh '''
cd /var/www/sirh
echo $SUDO_PASSWORD | sudo -S chown -R jenkins:jenkins /var/www/sirh
git fetch origin main
git reset --hard origin/main
python3 -m venv venv
. venv/bin/activate
pip install -r requirements.txt
python manage.py makemigrations
python manage.py migrate
echo $SUDO_PASSWORD | sudo -S rm -r staticfiles
python manage.py collectstatic --noinput
echo $SUDO_PASSWORD | sudo -S chown -R www-data:www-data /var/www/sirh
echo "Deploiement reussi"
echo $SUDO_PASSWORD | sudo -S supervisorctl restart sirh
'''
}
}
}
}

Binary file not shown.

View File

@@ -13,20 +13,22 @@ https://docs.djangoproject.com/en/5.2/ref/settings/
import os
from pathlib import Path
from decouple import config
# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/5.2/howto/deployment/checklist/
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'django-insecure--wdb9t(77rvyac$_q!n5gw86&0r(0&&j171v9h!-_$jahsza*5'
SECRET_KEY = config('SECRET_KEY')
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = False
DEBUG = config('DEBUG', default=False, cast=bool)
ALLOWED_HOSTS = ["https://support.cerfig.org", "support.cerfig.org"]
ALLOWED_HOSTS = config('ALLOWED_HOSTS', default=[]).split(',')
#CSRF_TRUSTED_ORIGINS = config("CSRF_TRUSTED_ORIGINS", default=[]).split(",")
# Application definition
@@ -40,12 +42,9 @@ INSTALLED_APPS = [
'gestion_employe',
'gestion_conge',
'gestion_projet',
'gestion_salle',
'simple_sso.sso_server'
'gestion_salle'
]
LOGIN_URL = 'login'
MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
@@ -68,6 +67,7 @@ TEMPLATES = [
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
'contexte_universel.contexte_universel',
],
},
},
@@ -79,24 +79,16 @@ WSGI_APPLICATION = 'SIRH.wsgi.application'
# Database
# https://docs.djangoproject.com/en/5.2/ref/settings/#databases
# DATABASES = {
# 'default': {
# 'ENGINE': 'django.db.backends.mysql',
# 'NAME': 'sirh',
# 'USER': 'sirh',
# 'PASSWORD': 'sirh-cerfig',
# 'HOST': 'localhost',
# 'PORT': '3306',
# }
# }
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
'ENGINE': 'django.db.backends.mysql',
'NAME': config("DB_NAME"),
'USER': config("DB_USER"),
'PASSWORD': config("DB_PASSWORD"),
'HOST': config("DB_HOST"),
'PORT': config("DB_PORT", cast=int),
}
}
}
# Password validation
# https://docs.djangoproject.com/en/5.2/ref/settings/#auth-password-validators
@@ -149,11 +141,21 @@ MEDIA_ROOT = BASE_DIR / "media"
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
# Connexion sso
# LOGIN_URL = '/client/'
LOGIN_URL = 'simple-sso-login'
SSO_PRIVATE_KEY = config('SSO_PRIVATE_KEY')
SSO_PUBLIC_KEY = config('SSO_PUBLIC_KEY')
SSO_SERVER = config('SSO_SERVER')
#SSO_LOGOUT_URL = 'http://test-authentification.cerfig.org:89/deconnexion'
# Configuration de l'email
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST = 'ssl0.ovh.net'
EMAIL_PORT = 465
EMAIL_USE_SSL = True
EMAIL_USE_TLS = False
EMAIL_HOST_USER = 'support.it@cerfig.org'
EMAIL_HOST_PASSWORD = 'Cerfig2025'
EMAIL_HOST_USER = config("EMAIL_HOST_USER")
EMAIL_HOST_PASSWORD = config("EMAIL_HOST_PASSWORD")
DEFAULT_FROM_EMAIL = EMAIL_HOST_USER

38
SIRH/sso.py Normal file
View File

@@ -0,0 +1,38 @@
# SGL/sso.py
from django.contrib.auth import get_user_model
from django.contrib.auth.models import Group
from simple_sso.sso_client.client import Client
from gestion_employe.models import Departement, Employe
User = get_user_model()
class SIRHClient(Client):
def build_user(self, user_data):
"""Crée le User et son Profile avec les infos reçues du serveur."""
user_data_copy = user_data.copy()
user_data.pop("departement", None)
user_data.pop("chef_departement", None)
user_data.pop("groups", None)
user = super().build_user(user_data)
departement = None
if "departement" in user_data_copy:
departement = Departement.objects.get_or_create(
nom=user_data_copy.get("departement", ""))[0]
Employe.objects.update_or_create(
user = user,
defaults = {
"departement": departement,
"chef": user_data_copy.get("chef_departement", None),
}
)
for group_name in user_data_copy.get("groups", []):
group, _ = Group.objects.get_or_create(name=group_name)
user.groups.add(group)
return user

View File

@@ -14,9 +14,10 @@
</head>
<body>
<div class="container-fluid">
{% include 'parts/menu_application.html' %}
<div class="row flex-nowrap">
{% include 'parts/menu_principal.html' %}
<div class="col-9 p-4">
<div class="col p-4">
{% block 'contenu' %} {% endblock %}
</div>
</div>

View File

@@ -24,6 +24,7 @@
{% endfor %}
{% endif %}
{% csrf_token %}
<input type="hidden" name="next" value="{{ next }}">
<div class="mb-3">
<label for="mail">Votre adresse email :</label>
<input type="text" name="mail" class="form-control" placeholder="Entrez votre e-mail" required>

View File

@@ -0,0 +1,24 @@
{% load static %}
<nav class="navbar navbar-expand-lg bg-body-tertiary">
<div class="container-fluid">
<a class="navbar-brand" href="#">
<img src="{% static 'img/cerfig.jpg' %}" alt="Logo" width="85" height="30" class="d-inline-block align-text-top">
</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="nav nav-tabs justify-content-end w-100">
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="{{ SIRH_LIEN }}">SIRH</a>
</li>
<li class="nav-item">
<a class="nav-link" href="{{ SGL_LIEN }}">SGL</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Laboratoire</a>
</li>
</ul>
</div>
</div>
</nav>

View File

@@ -6,51 +6,43 @@
{% if user.employe.photo %}
<img src="{{ user.employe.photo.url }}"
class="rounded-circle"
width="80"
height="80"
width="100"
height="100"
style="object-fit:cover;">
{% else %}
<i class="bi bi-person-circle text-white" style="font-size:60px;"></i>
{% endif %}
<div class="text-white mt-2">
{{ user.username }}
<div class="text-white mt-2 fw-bold fs-5">
{{ user.first_name }} {{ user.last_name }}
</div>
</div>
<a href="{% url 'gestion_employe:mon-profil' %}" class="text-white fw-bold text-decoration-none mb-4" style="font-size:1.4em">
<a href="{% url 'gestion_employe:mon-profil' %}" class="text-white fw-bold text-decoration-none mb-4" style="font-size: 1.2em;">
<i class="bi bi-person-circle"></i> Mon profil
</a>
{% if user|has_group:"ressource_humaine" or user|has_group:"direction" %}
<a href="{% url 'gestion_employe:index' %}" class="text-white fw-bold text-decoration-none mb-4" style="font-size:1.4em">
<a href="{% url 'gestion_employe:index' %}" class="text-white fw-bold text-decoration-none mb-4" style="font-size: 1.2em;">
<i class="bi bi-speedometer2"></i> Tableau de bord
</a>
{% endif %}
{% if user|has_group:"ressource_humaine" or user|has_group:"direction" %}
<a href="{% url 'gestion_projet:index' %}" class="text-white fw-bold text-decoration-none mb-4" style="font-size:1.4em">
<a href="{% url 'gestion_projet:index' %}" class="text-white fw-bold text-decoration-none mb-4" style="font-size: 1.2em;">
<i class="bi bi-folder"></i> Gestion des Projets
</a>
{% endif %}
<a href="{% url 'gestion_conges:conge' %}" class="text-white fw-bold text-decoration-none mb-4" style="font-size:1.4em">
<a href="{% url 'gestion_conges:conge' %}" class="text-white fw-bold text-decoration-none mb-4" style="font-size: 1.2em;">
<i class="bi bi-airplane"></i> Gestion des congés
</a>
{% if user|is_chef_projet %}
<a href="{% url 'gestion_projet:activites-projet' %}" class="text-white fw-bold text-decoration-none mb-4" style="font-size:1.4em">
<a href="{% url 'gestion_projet:activites-projet' %}" class="text-white fw-bold text-decoration-none mb-4" style="font-size: 1.2em;">
<i class="bi bi-list-task"></i> Suivi des Activités
</a>
{% endif %}
<a href="{% url 'gestion_salle:reservation-salle' %}" class="text-white fw-bold text-decoration-none mb-4" style="font-size:1.4em">
<a href="{% url 'gestion_salle:reservation-salle' %}" class="text-white fw-bold text-decoration-none mb-4" style="font-size: 1.2em;">
<i class="bi bi-calendar-check"></i> Réservation
</a>
{% comment %} <a href="{% url 'rapport-rh' %}" class="text-white fw-bold text-decoration-none mb-2" style="font-size:1.2em">
<i class="bi bi-graph-up"></i> Rapports et Statistiques
</a> {% endcomment %}
{% comment %} <a href="" class="text-white fw-bold text-decoration-none mb-2" style="font-size:1.2em">
<i class="bi bi-person-gear"></i> Gestion des Utilisateurs
</a> {% endcomment %}
{% comment %} <a href="{% url 'gestion_employe:departement' %}" class="text-white fw-bold text-decoration-none mb-2" style="font-size:1.2em">
<i class="bi bi-gear"></i> Paramètres
</a> {% endcomment %}
<a href="{% url 'deconnexion' %}" class="text-white fw-bold text-decoration-none mb-4" style="font-size:1.4em">
{% comment %} {% url 'deconnexion' %} {% endcomment %}
<a href="{% url 'deconnexion' %}" class="text-white fw-bold text-decoration-none mb-4" style="font-size: 1.2em;">
<i class="bi bi-box-arrow-right"></i> Déconnexion
</a>
</div>

View File

@@ -14,34 +14,31 @@ Including another URLconf
1. Import the include() function: from django.urls import include, path
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
"""
from django.conf import settings
from django.contrib import admin
from django.urls import include, path
from django.conf.urls.static import static
from django.conf import settings
# from simple_sso.sso_server.server import Server
from . import views
from .sso import SIRHClient
# server_sso = Server()
client_sirh = SIRHClient(
settings.SSO_SERVER,
settings.SSO_PUBLIC_KEY,
settings.SSO_PRIVATE_KEY
)
urlpatterns = [
path(
'',
views.login_view,
name='index'
),
path('login/',
views.login_view,
views.connexion,
name='login'
),
path(
'deconnexion/',
views.deconnexion_view,
views.deconnexion,
name='deconnexion'
),
path(
'employé/',
'',
include("gestion_employe.urls")
),
path(
@@ -60,8 +57,5 @@ urlpatterns = [
'admin/',
admin.site.urls
),
# path(
# 'sso',
# include(server_sso.get_urls())
# )
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
path("client/", include(client_sirh.get_urls())),
]

View File

@@ -1,37 +1,13 @@
from django.contrib.auth import authenticate, login, logout
from django.shortcuts import render, redirect
from django.contrib import messages
from django.contrib.auth import logout
from django.shortcuts import redirect
from django.urls import reverse_lazy
def login_view(request):
"""
Gère la connexion des utilisateurs avec redirection selon le rôle et
vérification de l'acceptation de la politique d'utilisation.
"""
if request.method == 'POST':
email = request.POST.get('mail')
password = request.POST.get('mot_de_passe')
if not (email and password):
messages.error(request, "Veuillez remplir tous les champs.")
return render(request, 'login.html')
def connexion(request):
"""Redirige vers le serveur SSO pour l'authentification."""
return redirect(reverse_lazy("simple-sso-login"))
user = authenticate(request, username=email, password=password)
if user is None:
messages.error(request, "Nom d’utilisateur ou mot de passe incorrect.")
return render(request, 'login.html')
if not user.is_active:
messages.error(request, "Compte inactif. Contactez l'administrateur.")
return render(request, 'login.html')
login(request, user)
return redirect("gestion_conges:conge")
return render(request, 'login.html')
def deconnexion_view(request):
"""Gère la déconnexion de l'utilisateur."""
def deconnexion(request):
"""Gérez la déconnexion des utilisateurs."""
logout(request)
return redirect('login')
return redirect("http://authentification.cerfig.org/login")

Binary file not shown.

7
contexte_universel.py Normal file
View File

@@ -0,0 +1,7 @@
from decouple import config
def contexte_universel(request):
return {
"SIRH_LIEN": config("SIRH_LIEN"),
"SGL_LIEN": config("SGL_LIEN")
}

View File

@@ -1,13 +1,35 @@
from django.conf import settings
from django.core.mail import send_mail
from django.utils import timezone
from gestion_employe.models import Contrat
from gestion_conge.models import Conge
from gestion_conge.models import Conge
from gestion_employe.models import Contrat, Employe
QUOTA_CONGE_ANNUEL = 30
NOMBRE_PAGINATION = 8
DEBUT_RAPPEL = 60
DUREE_FIN_CONTRAT = 90
try:
EMAIL_ASSISTANTE_DE_DIRECTION = list(Employe.objects.filter(fonction="assistant_direction").values_list('user__email', flat=True))
except:
pass
try:
EMAIL_EQUIPE_INFORMATIQUE = list(
Employe.objects.filter(departement__nom="Systeme informatique").values_list('user__email', flat=True)
) or ["support@cerfig.org"]
except:
EMAIL_EQUIPE_INFORMATIQUE = ["support@cerfig.org"]
def est_equipe_informatique(employe):
"""Vérifie si un employé appartient au département informatique"""
return employe.departement and employe.departement.nom == "Systeme informatique"
def est_assistante_direction(employe):
"""Vérifie si un employé est l'assistante de direction"""
return employe.fonction == "assistant_direction"
def solde_conge(employe):
"""Fonction de calcul du solde de congé restant l'employé"""
contrat = Contrat.objects.filter(employe=employe, statut='actif').order_by('-date_debut').first()
@@ -32,3 +54,23 @@ def solde_conge(employe):
"quota_annuel": QUOTA_CONGE_ANNUEL - jours_conges_valider,
"nombre_jours_valide": jours_conges_valider
}
def destinataire_mail_demande_conges(employe):
"""Fonction de récupération des destinataires pour les mails de demande de congés"""
if employe.chef:
return EMAIL_ASSISTANTE_DE_DIRECTION
else:
if employe.departement:
chefs_departement = Employe.objects.filter(departement=employe.departement, chef=True)
return list(chefs_departement.values_list('user__email', flat=True))
def envoyer_mail(sujet, message, destinataires):
"""Fonction d'envoi de mail"""
send_mail(
sujet,
message,
settings.EMAIL_HOST_USER,
destinataires,
fail_silently=False,
)

View File

@@ -1,11 +1,13 @@
from django import forms
from .models import Conge
class CongeForm(forms.ModelForm):
"""Formulaire de demande de congé."""
class Meta:
model = Conge
fields =['type', 'date_debut', 'date_fin']
fields =('type', 'date_debut', 'date_fin')
widgets = {
'date_debut': forms.DateInput(attrs={'type': 'date', 'class': 'form-control'}),
'date_fin': forms.DateInput(attrs={'type': 'date', 'class': 'form-control'}),

View File

@@ -1,4 +1,4 @@
# Generated by Django 5.2.13 on 2026-04-17 12:03
# Generated by Django 5.2.13 on 2026-09-03 14:33
import django.db.models.deletion
from django.db import migrations, models

Some files were not shown because too many files have changed in this diff Show More