Fix: édition config. via l'API (routes)
This commit is contained in:
parent
bd860295ba
commit
4f07da0b41
@ -41,7 +41,7 @@ function update_test_button_state() {
|
|||||||
async function load_ics_sample() {
|
async function load_ics_sample() {
|
||||||
var edt_id = document.getElementById('test_edt_id').value;
|
var edt_id = document.getElementById('test_edt_id').value;
|
||||||
try {
|
try {
|
||||||
const response = await fetch(`${SCO_URL}/../ics_raw_sample/${edt_id}`);
|
const response = await fetch(`/ScoDoc/ics_raw_sample/${edt_id}`);
|
||||||
if (!response.ok) {
|
if (!response.ok) {
|
||||||
throw new Error(`HTTP error! status: ${response.status}`);
|
throw new Error(`HTTP error! status: ${response.status}`);
|
||||||
}
|
}
|
||||||
|
@ -79,7 +79,7 @@ Les rôles <b>en gras</b> sont les rôles standards de ScoDoc.
|
|||||||
async function associe_role_permission(event) {
|
async function associe_role_permission(event) {
|
||||||
// /role/<string:role_name>/add_permission/<string:perm_name>"
|
// /role/<string:role_name>/add_permission/<string:perm_name>"
|
||||||
const method = event.target.checked ? "/add_permission/" : "/remove_permission/";
|
const method = event.target.checked ? "/add_permission/" : "/remove_permission/";
|
||||||
const url = `${SCO_URL}/../api/role/${event.target.dataset.role}${method}${event.target.dataset.permission}`;
|
const url = `/ScoDoc/api/role/${event.target.dataset.role}${method}${event.target.dataset.permission}`;
|
||||||
try {
|
try {
|
||||||
const response = await fetch(
|
const response = await fetch(
|
||||||
url,
|
url,
|
@ -155,7 +155,7 @@ def config_roles():
|
|||||||
permissions_names = sorted(Permission.permission_by_value.values())
|
permissions_names = sorted(Permission.permission_by_value.values())
|
||||||
roles = Role.query.order_by(Role.name).all()
|
roles = Role.query.order_by(Role.name).all()
|
||||||
return render_template(
|
return render_template(
|
||||||
"scodoc/role_editor.j2",
|
"scodoc/config_roles.j2",
|
||||||
Permission=Permission,
|
Permission=Permission,
|
||||||
permissions_names=permissions_names,
|
permissions_names=permissions_names,
|
||||||
roles=roles,
|
roles=roles,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
# -*- mode: python -*-
|
# -*- mode: python -*-
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
SCOVERSION = "9.6.74"
|
SCOVERSION = "9.6.75"
|
||||||
|
|
||||||
SCONAME = "ScoDoc"
|
SCONAME = "ScoDoc"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user