Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
U
utilisateur
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
lib
unicaen
utilisateur
Commits
ef5fd37f
Commit
ef5fd37f
authored
2 years ago
by
Florian Joriot
Browse files
Options
Downloads
Patches
Plain Diff
correction script install bdd
parent
d03dcff1
No related branches found
No related tags found
No related merge requests found
Pipeline
#18834
passed
2 years ago
Stage: release
Stage: publish
Changes
2
Pipelines
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
data/sql/data.sql
+56
-7
56 additions, 7 deletions
data/sql/data.sql
data/sql/schema_postgresql.sql
+1
-52
1 addition, 52 deletions
data/sql/schema_postgresql.sql
with
57 additions
and
59 deletions
data/sql/data.sql
+
56
−
7
View file @
ef5fd37f
...
...
@@ -4,8 +4,8 @@ INSERT INTO UNICAEN_PRIVILEGE_CATEGORIE (
NAMESPACE
,
ORDRE
)
values
(
'utilisateur'
,
'Gestion des utilisateurs'
,
'UnicaenUtilisateur
\P
rovider
\P
rivilege'
1
),
(
'role'
,
'Gestion des rôles'
,
'UnicaenUtilisateur
\P
rovider
\P
rivilege'
,
1
)
,
(
'utilisateur'
,
'Gestion des utilisateurs'
,
'UnicaenUtilisateur
\P
rovider
\P
rivilege'
,
1
),
(
'role'
,
'Gestion des rôles'
,
'UnicaenUtilisateur
\P
rovider
\P
rivilege'
,
1
)
ON
CONFLICT
(
CODE
)
DO
UPDATE
SET
LIBELLE
=
excluded
.
LIBELLE
,
...
...
@@ -40,3 +40,52 @@ FROM d
UPDATE
SET
LIBELLE
=
excluded
.
LIBELLE
,
ORDRE
=
excluded
.
ORDRE
;
INSERT
INTO
UNICAEN_UTILISATEUR_USER
(
ID
,
USERNAME
,
EMAIL
,
DISPLAY_NAME
,
PASSWORD
)
values
(
0
,
'app'
,
'dsi.applications@unicaen.fr'
,
'Application'
,
'application'
)
on
conflict
(
USERNAME
)
DO
UPDATE
SET
EMAIL
=
excluded
.
EMAIL
,
DISPLAY_NAME
=
excluded
.
DISPLAY_NAME
,
PASSWORD
=
excluded
.
PASSWORD
;
INSERT
INTO
unicaen_utilisateur_role
(
role_id
,
libelle
,
description
,
is_default
,
is_auto
,
parent_id
,
ldap_filter
,
accessible_exterieur
)
values
(
'Admin_tech '
,
'Administrateur·trice Technique'
,
'Administrateur Technique'
,
false
,
true
,
null
,
null
,
true
),
(
'Admin_fonc '
,
'Administrateur·trice Fonctionnel·le'
,
'Administrateur·trice Fonctionnel·le'
,
false
,
true
,
null
,
null
,
true
),
(
'Observateur '
,
'Observateur·trice'
,
'Observateur·trice'
,
false
,
true
,
null
,
null
,
true
)
ON
CONFLICT
(
role_id
)
DO
UPDATE
SET
libelle
=
excluded
.
libelle
,
description
=
excluded
.
description
,
is_default
=
excluded
.
is_default
,
is_auto
=
excluded
.
is_auto
,
parent_id
=
excluded
.
parent_id
,
ldap_filter
=
excluded
.
ldap_filter
,
accessible_exterieur
=
excluded
.
accessible_exterieur
;
-- INSERT INTO UNICAEN_UTILISATEUR_USER (username, email, display_name, password, state) VALUES
-- -- utilisateur demo/azerty
-- ('demo', 'demo@mail.fr', 'Demo Crite', '$2y$10$PxXnVLYnGEzEnfqPqRKJSe9AabocES2H4bBK5VzzJlzuj1rVt7Lwu', true);
-- INSERT INTO unicaen_utilisateur_role_linker
-- (role_id, user_id)
-- SELECT role.id, u.id FROM unicaen_utilisateur_role role,
-- unicaen_utilisateur_user u
-- WHERE role.role_id = 'Admin_tech'
-- AND u.username = 'demo'
-- ON CONFLICT DO NOTHING ;
\ No newline at end of file
This diff is collapsed.
Click to expand it.
data/sql/schema_postgresql.sql
+
1
−
52
View file @
ef5fd37f
...
...
@@ -53,54 +53,3 @@ CREATE TABLE IF NOT EXISTS UNICAEN_UTILISATEUR_ROLE_LINKER (
CREATE
INDEX
IF
NOT
EXISTS
IX_UNICAEN_UTILISATEUR_ROLE_LINKER_USER
ON
UNICAEN_UTILISATEUR_ROLE_LINKER
(
USER_ID
);
CREATE
INDEX
IF
NOT
EXISTS
IX_UNICAEN_UTILISATEUR_ROLE_LINKER_ROLE
ON
UNICAEN_UTILISATEUR_ROLE_LINKER
(
ROLE_ID
);
\ No newline at end of file
-- DATA
INSERT
INTO
UNICAEN_UTILISATEUR_USER
(
ID
,
USERNAME
,
EMAIL
,
DISPLAY_NAME
,
PASSWORD
)
values
(
0
,
'app'
,
'dsi.applications@unicaen.fr'
,
'Application'
,
'application'
)
on
conflict
(
USERNAME
)
DO
UPDATE
SET
EMAIL
=
excluded
.
EMAIL
,
DISPLAY_NAME
=
excluded
.
DISPLAY_NAME
,
PASSWORD
=
excluded
.
PASSWORD
;
insert
into
unicaen_utilisateur_role
(
role_id
,
libelle
,
description
,
is_default
,
is_auto
,
parent_id
,
ldap_filter
,
accessible_exterieur
)
values
(
'Admin_tech '
,
'Administrateur·trice Technique'
,
'Administrateur Technique'
,
false
,
true
,
null
,
null
,
true
),
(
'Admin_fonc '
,
'Administrateur·trice Fonctionnel·le'
,
'Administrateur·trice Fonctionnel·le'
,
false
,
true
,
null
,
null
,
true
),
(
'Observateur '
,
'Observateur·trice'
,
'Observateur·trice'
,
false
,
true
,
null
,
null
,
true
)
ON
CONFLICT
(
role_id
)
DO
UPDATE
SET
libelle
=
excluded
.
libelle
,
description
=
excluded
.
description
,
is_default
=
excluded
.
is_default
,
is_auto
=
excluded
.
is_auto
,
parent_id
=
excluded
.
parent_id
,
ldap_filter
=
excluded
.
ldap_filter
,
accessible_exterieur
=
excluded
.
accessible_exterieur
;
-- INSERT INTO UNICAEN_UTILISATEUR_USER (username, email, display_name, password, state) VALUES
-- -- utilisateur demo/azerty
-- ('demo', 'demo@mail.fr', 'Demo Crite', '$2y$10$PxXnVLYnGEzEnfqPqRKJSe9AabocES2H4bBK5VzzJlzuj1rVt7Lwu', true);
-- INSERT INTO unicaen_utilisateur_role_linker
-- (role_id, user_id)
-- SELECT role.id, u.id FROM unicaen_utilisateur_role role,
-- unicaen_utilisateur_user u
-- WHERE role.role_id = 'Admin_tech'
-- AND u.username = 'demo'
-- ON CONFLICT DO NOTHING ;
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment