From e20df823466cac395edbc1f8f99c5be3a76e0f84 Mon Sep 17 00:00:00 2001 From: Yohann D'ANELLO Date: Wed, 15 Dec 2021 15:55:13 +0100 Subject: [PATCH 1/9] Main branch is now called `main` Signed-off-by: Yohann D'ANELLO --- README.md | 4 ++-- ansible/host_vars/bde-note.adh.crans.org.yml | 2 +- docs/apps/treasury.rst | 2 +- docs/install.rst | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 26ced30c..98fe3713 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ # NoteKfet 2020 [![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0.txt) -[![pipeline status](https://gitlab.crans.org/bde/nk20/badges/master/pipeline.svg)](https://gitlab.crans.org/bde/nk20/commits/master) -[![coverage report](https://gitlab.crans.org/bde/nk20/badges/master/coverage.svg)](https://gitlab.crans.org/bde/nk20/commits/master) +[![pipeline status](https://gitlab.crans.org/bde/nk20/badges/main/pipeline.svg)](https://gitlab.crans.org/bde/nk20/commits/main) +[![coverage report](https://gitlab.crans.org/bde/nk20/badges/main/coverage.svg)](https://gitlab.crans.org/bde/nk20/commits/main) ## Table des matières diff --git a/ansible/host_vars/bde-note.adh.crans.org.yml b/ansible/host_vars/bde-note.adh.crans.org.yml index 9c8ec1ed..6b97e084 100644 --- a/ansible/host_vars/bde-note.adh.crans.org.yml +++ b/ansible/host_vars/bde-note.adh.crans.org.yml @@ -1,7 +1,7 @@ --- note: server_name: note.crans.org - git_branch: master + git_branch: main serve_static: true cron_enabled: true email: notekfet2020@lists.crans.org diff --git a/docs/apps/treasury.rst b/docs/apps/treasury.rst index 5fc5d6b2..7c2a8746 100644 --- a/docs/apps/treasury.rst +++ b/docs/apps/treasury.rst @@ -86,7 +86,7 @@ Génération Les factures peuvent s'exporter au format PDF (là est tout leur intérêt). Pour cela, on utilise le template LaTeX présent à l'adresse suivante : -`/templates/treasury/invoice_sample.tex `_ +`/templates/treasury/invoice_sample.tex `_ On le remplit avec les données de la facture et les données du BDE, hard-codées. On copie le template rempli dans un ficher tex dans un dossier temporaire. On fait ensuite 2 appels à ``pdflatex`` pour générer la facture au format PDF. diff --git a/docs/install.rst b/docs/install.rst index 09d1e539..15ce27df 100644 --- a/docs/install.rst +++ b/docs/install.rst @@ -88,7 +88,7 @@ On clone donc le dépôt en tant que ``www-data`` : $ sudo -u www-data git clone https://gitlab.crans.org/bde/nk20.git /var/www/note_kfet -Par défaut, le dépôt est configuré pour suivre la branche ``master``, qui est la branche +Par défaut, le dépôt est configuré pour suivre la branche ``main``, qui est la branche stable, notamment installée sur ``_. Pour changer de branche, notamment passer sur la branche ``beta`` sur un serveur de pré-production (un peu comme ``_), on peut faire : @@ -587,7 +587,7 @@ Dans ce fichier, remplissez : --- note: server_name: note.crans.org - git_branch: master + git_branch: main cron_enabled: true email: notekfet2020@lists.crans.org From 6bf16a181acde951198c939e344e292f13ad4f4c Mon Sep 17 00:00:00 2001 From: Yohann D'ANELLO Date: Wed, 15 Dec 2021 15:59:58 +0100 Subject: [PATCH 2/9] [ansible] Deploy buster-backports repository only on Debian 10 Signed-off-by: Yohann D'ANELLO --- ansible/base.yml | 2 +- ansible/roles/1-apt-basic/tasks/main.yml | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/ansible/base.yml b/ansible/base.yml index 83b20cbb..05e63b1c 100755 --- a/ansible/base.yml +++ b/ansible/base.yml @@ -7,7 +7,7 @@ prompt: "Password of the database (leave it blank to skip database init)" private: yes vars: - mirror: mirror.crans.org + mirror: eclats.crans.org roles: - 1-apt-basic - 2-nk20 diff --git a/ansible/roles/1-apt-basic/tasks/main.yml b/ansible/roles/1-apt-basic/tasks/main.yml index 7c57646f..bbef195a 100644 --- a/ansible/roles/1-apt-basic/tasks/main.yml +++ b/ansible/roles/1-apt-basic/tasks/main.yml @@ -1,14 +1,15 @@ --- -- name: Add buster-backports to apt sources +- name: Add buster-backports to apt sources if needed apt_repository: repo: deb http://{{ mirror }}/debian buster-backports main state: present - when: ansible_facts['distribution'] == "Debian" + when: + - ansible_distribution == "Debian" + - ansible_distribution_major_version | int == 10 - name: Install note_kfet APT dependencies apt: update_cache: true - default_release: "{{ 'buster-backports' if ansible_facts['distribution'] == 'Debian' }}" install_recommends: false name: # Common tools From 132afc3d15448f01bf1d214e17d91cf19e988c11 Mon Sep 17 00:00:00 2001 From: Yohann D'ANELLO Date: Wed, 15 Dec 2021 18:59:23 +0100 Subject: [PATCH 3/9] Fix scope view Signed-off-by: Yohann D'ANELLO --- .../templates/permission/scopes.html | 23 +++++++++---------- 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/apps/permission/templates/permission/scopes.html b/apps/permission/templates/permission/scopes.html index 31a4395e..bebc0898 100644 --- a/apps/permission/templates/permission/scopes.html +++ b/apps/permission/templates/permission/scopes.html @@ -11,25 +11,25 @@
{% for app, app_scopes in scopes.items %}
-
+ -
+
{% for scope_id, scope_desc in app_scopes.items %}
-
{% endfor %} -

+

{{ request.scheme }}://{{ request.get_host }}{% url 'oauth2_provider:authorize' %}?client_id={{ app.client_id }}&response_type=code @@ -51,11 +51,10 @@ {% block extrajavascript %}