Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
File Transfer Service
fts-rest-flask
Commits
b0dc00bb
Commit
b0dc00bb
authored
May 05, 2022
by
Shiting Long
Browse files
add accessibility check for setting OS token through cloud storage urls
parent
ad282dbd
Pipeline
#3938199
failed with stages
in 1 minute and 33 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/fts3rest/fts3rest/controllers/CSswift.py
View file @
b0dc00bb
...
...
@@ -160,6 +160,11 @@ class SwiftConnector(Connector):
cred
[
"os_token"
],
cred
[
"project_id"
])
if
cloud_credential
:
cloud_storage
=
Session
.
query
(
CloudStorage
).
get
(
'SWIFT:'
+
parsed
.
hostname
)
if
not
swiftauth
.
verified_swift_project_user
(
cloud_storage
,
cloud_credential
):
raise
BadRequest
(
"Cloud user does not have access to the required Swift project"
)
try
:
Session
.
merge
(
CloudCredentialCache
(
**
cloud_credential
))
Session
.
commit
()
...
...
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