-
Notifications
You must be signed in to change notification settings - Fork 107
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
Use url parameter in repository access condition #1800
Conversation
[noissue] Required PR: pulp/pulpcore#1800
5a176b1
to
b6abcc7
Compare
[noissue] Required PR: pulp/pulpcore#1800
b6abcc7
to
50b30d0
Compare
[noissue] Required PR: pulp/pulpcore#1800
[noissue] Required PR: pulp/pulpcore#1800
[noissue] Required PR: pulp/pulpcore#1800
670fab7
to
8d6bd8c
Compare
03a3383
to
7b2af59
Compare
7b2af59
to
9d3d621
Compare
fixes pulp#508 Required PR: pulp/pulpcore#1800
Attached issue: https://pulp.plan.io/issues/9670 |
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.
What difference do these new methods have compared to has_repo_attr_obj_perms
? Also, that method shortens repository so should these new ones shorten it as well?
The difference is, that you don not need a detailed object with a repository attribute, but you can apply it to all actions that are nested under a repository viewset. The prime example is RepositoryVersionViewset where the list action could not use the existing condition. |
fixes pulp#508 Required PR: pulp/pulpcore#1800
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.
Every plugin will need these for implementing RBAC, but I wonder if there are any other objects across Pulp and its plugins that needs similar helper methods? (Maybe exporters/importers?)
[noissue] Required PR: pulp/pulpcore#1800
@@ -280,6 +280,68 @@ def has_repo_attr_model_or_obj_perms(request, view, action, permission): | |||
return False | |||
|
|||
|
|||
def has_repository_obj_perms(request, view, action, permission): |
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.
We don't have to import these through the plugin API do we?
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.
@mdellweg if ^ is correct go ahead and merge plz.
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.
no
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.
Thanks!
fixes pulp#508 Required PR: pulp/pulpcore#1800
[noissue] Required PR: pulp/pulpcore#1800
fixes TBA
[noissue]