diff --git a/app/templates/role_editor.j2 b/app/templates/role_editor.j2
new file mode 100644
index 0000000000..bc4ea948ff
--- /dev/null
+++ b/app/templates/role_editor.j2
@@ -0,0 +1,69 @@
+{# -*- mode: jinja-html -*- #}
+{# -*- Edition des r么les/permissions -- inspir茅 de partition_editor -*- #}
+{% extends "base.j2" %}
+{% import 'bootstrap/wtf.html' as wtf %}
+
+{% block styles %}
+ {{super()}}
+
+
+{% endblock %}
+
+{% block app_content %}
+
+
D茅finition des r么les et leurs permissions
+
+
Les r么les sont associ茅s 脿 un ensemble de permissions. Chaque
+utilisateur peut avoir un nombre quelconque de r么les dans chaque
+d茅partement .
+Sur cette page vous pouvez modifier les permissions associ茅e 脿 chaque r么le, ou cr茅er de nouveaux r么les.
+
+
+{#
#}
+
+
+
+
+ {% for role in roles %}
+
+ {% endfor %}
+
+
+
+
+
+
+{% endblock %}
\ No newline at end of file
diff --git a/app/views/scodoc.py b/app/views/scodoc.py
index 214ea42611..ca2ec09650 100644
--- a/app/views/scodoc.py
+++ b/app/views/scodoc.py
@@ -53,7 +53,7 @@ from werkzeug.exceptions import BadRequest, NotFound
from app import db
-from app.auth.models import User
+from app.auth.models import User, Role
from app.auth.cas import set_cas_configuration
from app.decorators import (
admin_required,
@@ -144,6 +144,20 @@ def toggle_dept_vis(dept_id):
return redirect(url_for("scodoc.index"))
+@bp.route("/ScoDoc/config_roles", methods=["GET", "POST"])
+@admin_required
+def config_roles():
+ """Form associations r么les / permissions"""
+ permissions_names = sorted(Permission.permission_by_value.values())
+ roles = Role.query.order_by(Role.name).all()
+ return render_template(
+ "role_editor.j2",
+ Permission=Permission,
+ permissions_names=permissions_names,
+ roles=roles,
+ )
+
+
@bp.route("/ScoDoc/config_cas", methods=["GET", "POST"])
@admin_required
def config_cas():
diff --git a/app/views/users.py b/app/views/users.py
index 6f60b090fa..acee92a35b 100644
--- a/app/views/users.py
+++ b/app/views/users.py
@@ -39,7 +39,7 @@ from enum import auto, IntEnum
from xml.etree import ElementTree
import flask
-from flask import g, url_for, request, current_app, flash
+from flask import g, url_for, request, flash
from flask import redirect, render_template
from flask_login import current_user
from flask_wtf import FlaskForm
@@ -74,6 +74,8 @@ from app.scodoc.sco_import_users import generate_password
from app.scodoc.sco_permissions_check import can_handle_passwd
from app.scodoc.TrivialFormulator import TrivialFormulator, tf_error_message
from app.views import users_bp as bp
+from app.views import scodoc_bp
+
_ = lambda x: x # sans babel
_l = _