-
Notifications
You must be signed in to change notification settings - Fork 3
/
comptes.sql
71 lines (65 loc) · 2.11 KB
/
comptes.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
SELECT 'redirect' AS component,
'signin.sql?error' AS link
WHERE NOT EXISTS (SELECT 1 FROM login_session WHERE id=sqlpage.cookie('session'));
SET group_id = (SELECT user_info.groupe FROM login_session join user_info on user_info.username=login_session.username WHERE id = sqlpage.cookie('session'));
SELECT 'redirect' AS component,
'index.sql?restriction' AS link
WHERE $group_id<'4';
SELECT 'redirect' AS component,
'index.sql?restriction' AS link
WHERE $group_id<>'4';
SELECT 'redirect' AS component,
'index.sql?restriction' AS link
WHERE $group_id<>'4';
--Menu
SELECT 'dynamic' AS component, sqlpage.read_file_as_text('menu.json') AS properties;
-- Message si droits insuffisants sur une page
SELECT 'alert' as component,
'Importation terminée' as title,
'Les identifiants CAS ont été importés.'
as description_md,
TRUE as dismissible,
'alert-circle' as icon,
'green' as color
WHERE $CAS IS NOT NULL;
select
'button' as component,
'sm' as size,
'pill' as shape;
select
'Nouveau compte' as title,
'comptes_ajout.sql' as link,
'square-rounded-plus' as icon,
'green' as outline;
select
'Retour' as title,
'parametres.sql' as link,
'arrow-back-up' as icon,
'green' as outline;
-- Liste
SELECT 'table' as component,
'Admin' as markdown,
TRUE as hover,
TRUE as striped_rows,
TRUE as small,
1 as sort,
1 as search;
SELECT
nom AS Nom,
prenom AS Prénom,
username as Identifiant,
CASE WHEN groupe=1 THEN 'consultation Enseignant'
WHEN groupe=2 THEN 'consultation AESH'
WHEN groupe=3 THEN 'édition'
WHEN groupe=4 THEN 'administration'
END as Permissions,
etab.nom_etab as Établissement,
classe as Classe,
activation as Code,
connexion as Connexion,
'[
![](./icons/pencil.svg)
](comptes_edit.sql?id='||username||')[
![](./icons/trash.svg)
](comptes_delete.sql?id='||username||')' as Admin
FROM user_info LEFT JOIN etab on user_info.etab=etab.id WHERE username<>'admin' ORDER BY nom ASC;