Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Open Subsurface Data Universe Software
Platform
Domain Data Mgmt Services
Seismic
Seismic DMS Suite
seismic-dms-service
Commits
3ffd2e94
Commit
3ffd2e94
authored
Aug 04, 2021
by
Varunkumar Manohar
Committed by
varungbt
Aug 11, 2021
Browse files
Update handler.ts
parent
0bf4ab4b
Pipeline
#58056
passed with stages
in 11 minutes and 36 seconds
Changes
1
Pipelines
6
Hide whitespace changes
Inline
Side-by-side
src/services/subproject/handler.ts
View file @
3ffd2e94
...
...
@@ -130,12 +130,14 @@ export class SubProjectHandler {
if
(
FeatureFlags
.
isEnabled
(
Feature
.
AUTHORIZATION
))
{
// provision new groups
await
AuthGroups
.
createGroup
(
userToken
,
adminGroupName
,
'
seismic dms tenant
'
+
tenant
.
name
+
'
subproject
'
+
subproject
.
name
+
'
admin group
'
,
tenant
.
esd
,
req
[
Config
.
DE_FORWARD_APPKEY
]);
await
AuthGroups
.
createGroup
(
userToken
,
viewerGroupName
,
'
seismic dms tenant
'
+
tenant
.
name
+
'
subproject
'
+
subproject
.
name
+
'
editor group
'
,
tenant
.
esd
,
req
[
Config
.
DE_FORWARD_APPKEY
]);
await
Promise
.
all
([
AuthGroups
.
createGroup
(
userToken
,
adminGroupName
,
'
seismic dms tenant
'
+
tenant
.
name
+
'
subproject
'
+
subproject
.
name
+
'
admin group
'
,
tenant
.
esd
,
req
[
Config
.
DE_FORWARD_APPKEY
]),
AuthGroups
.
createGroup
(
userToken
,
viewerGroupName
,
'
seismic dms tenant
'
+
tenant
.
name
+
'
subproject
'
+
subproject
.
name
+
'
editor group
'
,
tenant
.
esd
,
req
[
Config
.
DE_FORWARD_APPKEY
])]
);
}
subproject
.
gcs_bucket
=
await
this
.
getBucketName
(
tenant
);
...
...
@@ -163,11 +165,12 @@ export class SubProjectHandler {
// if admin is not the requestor, assign the admin and rm the requestor, has to be a sequential op
if
(
subprojectCreatorEmail
!==
userEmail
)
{
await
AuthGroups
.
addUserToGroup
(
userToken
,
adminGroup
,
subprojectCreatorEmail
,
tenant
.
esd
,
req
[
Config
.
DE_FORWARD_APPKEY
],
'
OWNER
'
,
true
);
await
AuthGroups
.
addUserToGroup
(
userToken
,
viewerGroup
,
subprojectCreatorEmail
,
tenant
.
esd
,
req
[
Config
.
DE_FORWARD_APPKEY
],
'
OWNER
'
,
true
);
await
Promise
.
all
([
AuthGroups
.
addUserToGroup
(
userToken
,
adminGroup
,
subprojectCreatorEmail
,
tenant
.
esd
,
req
[
Config
.
DE_FORWARD_APPKEY
],
'
OWNER
'
,
true
),
AuthGroups
.
addUserToGroup
(
userToken
,
viewerGroup
,
subprojectCreatorEmail
,
tenant
.
esd
,
req
[
Config
.
DE_FORWARD_APPKEY
],
'
OWNER
'
,
true
)
]);
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment