Skip to content

Commit

Permalink
Adjust access policies for labels (#1569)
Browse files Browse the repository at this point in the history
fixes #1568
  • Loading branch information
mdellweg committed Sep 8, 2023
1 parent 71e32c9 commit 567b0c7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGES/1568.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Adjusted default access policies for new labels api.
10 changes: 5 additions & 5 deletions pulp_ansible/app/viewsets.py
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ class RoleRemoteViewSet(RemoteViewSet, RolesMixin):
"condition": "has_model_or_obj_perms:ansible.delete_roleremote",
},
{
"action": ["update", "partial_update"],
"action": ["update", "partial_update", "set_label", "unset_label"],
"principal": "authenticated",
"effect": "allow",
"condition": "has_model_or_obj_perms:ansible.change_roleremote",
Expand Down Expand Up @@ -513,7 +513,7 @@ class GitRemoteViewSet(RemoteViewSet, RolesMixin):
"condition": "has_model_or_obj_perms:ansible.delete_gitremote",
},
{
"action": ["update", "partial_update"],
"action": ["update", "partial_update", "set_label", "unset_label"],
"principal": "authenticated",
"effect": "allow",
"condition": "has_model_or_obj_perms:ansible.change_gitremote",
Expand Down Expand Up @@ -585,7 +585,7 @@ def get_queryset(self):
"condition": "has_model_or_obj_perms:ansible.delete_ansiblerepository",
},
{
"action": ["update", "partial_update"],
"action": ["update", "partial_update", "set_label", "unset_label"],
"principal": "authenticated",
"effect": "allow",
"condition": [
Expand Down Expand Up @@ -1026,7 +1026,7 @@ def get_queryset(self):
"condition": "has_model_or_obj_perms:ansible.delete_collectionremote",
},
{
"action": ["update", "partial_update"],
"action": ["update", "partial_update", "set_label", "unset_label"],
"principal": "authenticated",
"effect": "allow",
"condition": "has_model_or_obj_perms:ansible.change_collectionremote",
Expand Down Expand Up @@ -1152,7 +1152,7 @@ class AnsibleDistributionViewSet(DistributionViewSet, RolesMixin):
],
},
{
"action": ["update", "partial_update"],
"action": ["update", "partial_update", "set_label", "unset_label"],
"principal": "authenticated",
"effect": "allow",
"condition": [
Expand Down

0 comments on commit 567b0c7

Please sign in to comment.