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
1003c8db
Commit
1003c8db
authored
2 years ago
by
Thibaut Vallee
Browse files
Options
Downloads
Patches
Plain Diff
ajustement du message en l'abscence de la fonction inexistante
parent
59e29bbd
No related branches found
No related tags found
No related merge requests found
Pipeline
#18351
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
+42
-0
42 additions, 0 deletions
data/sql/data.sql
view/unicaen-utilisateur/role/index.phtml
+3
-1
3 additions, 1 deletion
view/unicaen-utilisateur/role/index.phtml
with
45 additions
and
1 deletion
data/sql/data.sql
0 → 100644
+
42
−
0
View file @
1003c8db
INSERT
INTO
UNICAEN_PRIVILEGE_CATEGORIE
(
CODE
,
LIBELLE
,
NAMESPACE
,
ORDRE
)
values
(
'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
,
NAMESPACE
=
excluded
.
NAMESPACE
,
ORDRE
=
excluded
.
ORDRE
;
WITH
d
(
code
,
lib
,
ordre
)
AS
(
SELECT
'utilisateur_afficher'
,
'Consulter un utilisateur'
,
1
UNION
SELECT
'utilisateur_ajouter'
,
'Ajouter un utilisateur'
,
2
UNION
SELECT
'utilisateur_changerstatus'
,
'Changer le statut d
''
un utilisateur'
,
3
UNION
SELECT
'utilisateur_modifierrole'
,
'Modifier les rôles attribués à un utilisateur'
,
4
)
INSERT
INTO
unicaen_privilege_privilege
(
CATEGORIE_ID
,
CODE
,
LIBELLE
,
ORDRE
)
SELECT
cp
.
id
,
d
.
code
,
d
.
lib
,
d
.
ordre
FROM
d
JOIN
unicaen_privilege_categorie
cp
ON
cp
.
CODE
=
'utilisateur'
ON
CONFLICT
(
CATEGORIE_ID
,
CODE
)
DO
UPDATE
SET
LIBELLE
=
excluded
.
LIBELLE
,
ORDRE
=
excluded
.
ORDRE
;
WITH
d
(
code
,
lib
,
ordre
)
AS
(
SELECT
'role_afficher'
,
'Consulter les rôles'
,
1
UNION
SELECT
'role_modifier'
,
'Modifier un rôle'
,
2
UNION
SELECT
'role_effacer'
,
'Supprimer un rôle'
,
3
)
INSERT
INTO
unicaen_privilege_privilege
(
CATEGORIE_ID
,
CODE
,
LIBELLE
,
ORDRE
)
SELECT
cp
.
id
,
d
.
code
,
d
.
lib
,
d
.
ordre
FROM
d
JOIN
unicaen_privilege_categorie
cp
ON
cp
.
CODE
=
'role'
ON
CONFLICT
(
CATEGORIE_ID
,
CODE
)
DO
UPDATE
SET
LIBELLE
=
excluded
.
LIBELLE
,
ORDRE
=
excluded
.
ORDRE
;
\ No newline at end of file
This diff is collapsed.
Click to expand it.
view/unicaen-utilisateur/role/index.phtml
+
3
−
1
View file @
1003c8db
...
...
@@ -82,15 +82,17 @@ $this->headTitle("Rôles");
<?php
if
(
$role
->
isAuto
())
:
?>
<?php
if
(
$identityproviders
!==
null
)
:
?>
<?php
$found
=
false
;
$result
=
[];
foreach
(
$identityproviders
as
$identityprovider
)
{
if
(
method_exists
(
$identityprovider
,
'computeUsersAutomatiques'
))
{
$found
=
true
;
$computed
=
$identityprovider
->
computeUsersAutomatiques
(
$role
->
getRoleId
());
if
(
$computed
!==
null
)
$result
=
array_merge
(
$result
,
$computed
);
}
}
?>
<?php
if
(
$
result
)
:
?>
<?php
if
(
$
found
)
:
?>
<i
class=
"fas fa-user"
></i>
<?php
echo
count
(
$result
);
?>
<?php
else
:
?>
<span
class=
"text-warning"
><i
class=
"fas fa-exclamation-triangle"
></i>
Aucune méthode de calcul associée à ce rôle automatique.
</span>
...
...
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