Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
seismic-dms-service
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
Service Desk
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OSDU Software
OSDU Data Platform
Domain Data Management Services
Seismic
Seismic DMS Suite
seismic-dms-service
Merge requests
!594
fix: add condition for missing acl group
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
fix: add condition for missing acl group
slb/kk/acl-iteration-fix
into
master
Overview
0
Commits
2
Pipelines
2
Changes
1
Merged
Konstantin Khottchenkov
requested to merge
slb/kk/acl-iteration-fix
into
master
2 years ago
Overview
0
Commits
2
Pipelines
2
Changes
1
Expand
fix /user/roles endpoint to avoid 500 error in case ACLS has no admins or viewers list
0
0
Merge request reports
Compare
master
version 1
636dc0c2
2 years ago
master (base)
and
latest version
latest version
3976aa2b
2 commits,
2 years ago
version 1
636dc0c2
1 commit,
2 years ago
1 file
+
12
−
8
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
app/sdms/src/services/user/handler.ts
+
12
−
8
Options
@@ -466,16 +466,20 @@ export class UserHandler {
let
roles
=
[];
const
subprojects
=
(
await
SubProjectDAO
.
list
(
journalClient
,
sdPath
.
tenant
));
for
(
const
subproject
of
subprojects
)
{
for
(
const
admin
of
subproject
.
acls
?.
admins
)
{
if
(
groupEmailsOfUser
.
includes
(
admin
))
{
roles
.
push
([
'
/
'
+
subproject
.
name
,
'
admin
'
]);
break
;
if
(
subproject
.
acls
?.
admins
)
{
for
(
const
admin
of
subproject
.
acls
?.
admins
)
{
if
(
groupEmailsOfUser
.
includes
(
admin
))
{
roles
.
push
([
'
/
'
+
subproject
.
name
,
'
admin
'
]);
break
;
}
}
}
for
(
const
viewer
of
subproject
.
acls
?.
viewers
)
{
if
(
groupEmailsOfUser
.
includes
(
viewer
))
{
roles
.
push
([
'
/
'
+
subproject
.
name
,
'
viewer
'
]);
break
;
if
(
subproject
.
acls
?.
viewers
)
{
for
(
const
viewer
of
subproject
.
acls
?.
viewers
)
{
if
(
groupEmailsOfUser
.
includes
(
viewer
))
{
roles
.
push
([
'
/
'
+
subproject
.
name
,
'
viewer
'
]);
break
;
}
}
}
}
Loading