Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
MaarchParapheur
Manage
Activity
Members
Plan
Redmine
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor analytics
Repository analytics
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
Maarch
MaarchParapheur
Commits
469cf385
Commit
469cf385
authored
2 years ago
by
Hamza HRAMCHI
Browse files
Options
Downloads
Patches
Plain Diff
FIX #17436 TIME 0:10 update url + getPrivilegeParameters function
parent
daf048f1
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/frontend/app/administration/group/group.component.ts
+19
-21
19 additions, 21 deletions
src/frontend/app/administration/group/group.component.ts
with
19 additions
and
21 deletions
src/frontend/app/administration/group/group.component.ts
+
19
−
21
View file @
469cf385
...
...
@@ -158,32 +158,30 @@ export class GroupComponent implements OnInit {
}
getPrivilegeParameters
()
{
const
privilege
:
any
=
this
.
group
.
privileges
.
find
((
item
:
any
)
=>
item
.
id
===
'
manage_users
'
);
return
new
Promise
((
resolve
)
=>
{
this
.
http
.
get
(
'
../rest/groups/
'
+
this
.
group
.
id
+
'
/privilege/
'
+
privilege
.
id
).
pipe
(
this
.
http
.
get
(
'
../rest/groups/
'
+
this
.
group
.
id
).
pipe
(
tap
((
data
:
any
)
=>
{
this
.
allGroups
.
forEach
((
element
:
any
,
index
:
number
)
=>
{
if
(
this
.
groups
.
find
((
item
:
any
)
=>
item
.
id
===
element
.
id
)
===
undefined
)
{
let
checked
:
boolean
;
if
(
data
.
parameters
.
authorized
!==
undefined
)
{
if
(
data
.
parameters
.
authorized
.
indexOf
(
element
.
id
)
>
-
1
)
{
checked
=
true
;
const
manageUsers
:
any
=
data
.
group
.
privileges
.
find
((
item
:
any
)
=>
item
.
id
===
'
manage_users
'
);
if
(
!
this
.
functions
.
empty
(
manageUsers
))
{
this
.
allGroups
.
forEach
((
element
:
any
,
index
:
number
)
=>
{
if
(
this
.
groups
.
find
((
item
:
any
)
=>
item
.
id
===
element
.
id
)
===
undefined
)
{
let
checked
:
boolean
;
if
(
!
this
.
functions
.
empty
(
manageUsers
.
parameters
.
authorized
))
{
checked
=
manageUsers
.
parameters
.
authorized
.
indexOf
(
element
.
id
)
>
-
1
;
}
else
{
checked
=
fals
e
;
checked
=
tru
e
;
}
}
else
{
checked
=
true
;
this
.
groups
.
push
(
{
id
:
element
.
id
,
label
:
element
.
label
,
checked
:
checked
}
);
}
this
.
groups
.
push
(
{
id
:
element
.
id
,
label
:
element
.
label
,
checked
:
checked
}
);
}
});
this
.
groups
=
[...
new
Set
(
this
.
groups
)];
});
this
.
groups
=
[...
new
Set
(
this
.
groups
)];
}
resolve
(
true
);
}),
catchError
((
err
:
any
)
=>
{
...
...
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