Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix sharing of buckets #2414

Merged
merged 2 commits into from
Nov 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.D/2414.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix sharing buckets using `neuro acl grant`.
10 changes: 7 additions & 3 deletions neuro-cli/src/neuro_cli/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -538,9 +538,13 @@ def parse_resource_for_sharing(uri: str, root: Root) -> URL:
if uri_res.scheme == "image" and ":" in uri_res.path:
raise ValueError("tag is not allowed")

# URI's for object storage can only operate on bucket level
if uri_res.scheme == "blob" and "/" in uri_res.path.strip("/"):
raise ValueError("Only bucket level permissions are supported for Blob Storage")
if uri_res.scheme == "blob":
# Lets check that this is bucket url, not object in bucket
res = root.client.parse.split_blob_uri(uri_res)
if res.key:
raise ValueError(
"Only bucket level permissions are supported for Blob Storage"
)
return uri_res


Expand Down