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
Adjust distributuon policy. #321
Conversation
"condition": "has_namespace_perms:container.add_containerdistribution", | ||
}, | ||
{ | ||
"action": ["create"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
allows to create distribution and namespace whenever username matches
"condition": "has_namespace_model_perms", | ||
}, | ||
{ | ||
"action": ["create"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
condition to match when namespace exists
@@ -995,7 +995,19 @@ class ContainerDistributionViewSet(DistributionViewSet): | |||
"action": ["create"], | |||
"principal": "authenticated", | |||
"effect": "allow", | |||
"condition": "has_model_perms:container.add_containerdistribution", | |||
"condition": "has_namespace_model_perms", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
condition to match when namespace does not exist and does not match the login
WARNING!!! This PR is not attached to an issue. In most cases this is not advisable. Please see our PR docs for more information about how to attach this PR to an issue. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
04e36df
to
5f3d230
Compare
b3d4fab
to
1ac4911
Compare
I don't think these changes require a migration, so marking as ready for re-review. |
[noisuse]