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
5776d98a
Commit
5776d98a
authored
Jul 21, 2021
by
Diego Molteni
Committed by
Sacha Brants
Jul 21, 2021
Browse files
fix: check dataset existence on Idempotency evaluation
parent
9401f8e9
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
NOTICE
View file @
5776d98a
This diff is collapsed.
Click to expand it.
src/services/dataset/handler.ts
View file @
5776d98a
...
...
@@ -131,8 +131,10 @@ export class DatasetHandler {
const
alreadyRegisteredDataset
=
subproject
.
enforce_key
?
await
DatasetDAO
.
getByKey
(
journalClient
,
dataset
)
:
(
await
DatasetDAO
.
get
(
journalClient
,
dataset
))[
0
];
await
Locker
.
removeWriteLock
(
writeLockSession
,
true
);
// Keep the lock session
return
alreadyRegisteredDataset
;
if
(
alreadyRegisteredDataset
)
{
await
Locker
.
removeWriteLock
(
writeLockSession
,
true
);
// Keep the lock session
return
alreadyRegisteredDataset
;
}
}
// set gcs URL and LegalTag with the subproject information
...
...
@@ -434,7 +436,7 @@ export class DatasetHandler {
// Check authorizations
if
(
FeatureFlags
.
isEnabled
(
Feature
.
AUTHORIZATION
))
{
if
(
wid
.
startsWith
(
'
W
'
))
{
if
(
wid
.
startsWith
(
'
W
'
))
{
await
Auth
.
isWriteAuthorized
(
req
.
headers
.
authorization
,
subproject
.
acls
.
admins
,
tenant
,
subproject
.
name
,
req
[
Config
.
DE_FORWARD_APPKEY
]);
...
...
@@ -527,7 +529,7 @@ export class DatasetHandler {
}
await
Auth
.
isWriteAuthorized
(
req
.
headers
.
authorization
,
authGroups
,
tenant
,
subproject
.
name
,
req
[
Config
.
DE_FORWARD_APPKEY
]);
authGroups
,
tenant
,
subproject
.
name
,
req
[
Config
.
DE_FORWARD_APPKEY
]);
}
// patch datasetOUT with datasetIN
...
...
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