Skip to content

Commit 8934c3c

Browse files
authored
Fix groups endpoint viewable only by admin (#696)
pulpcore 3.10.0 introduced queryset_filtering_required_permission attribute to GroupViewSet with a permission not used by galaxy_ng. Currently it can not be overridden simply by setting to None, so the attribute is removed from the subclass. Issue: AAH-453
1 parent 17fe79d commit 8934c3c

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

CHANGES/453.bugfix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix groups endpoint viewable only by admin

galaxy_ng/app/api/ui/viewsets/group.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,12 @@ class GroupViewSet(LocalSettingsMixin, viewsets.GroupViewSet):
2929
filterset_class = GroupFilter
3030
permission_classes = [access_policy.GroupAccessPolicy]
3131

32+
# TODO(awcrosby): replace this by setting attribute to None
33+
# after https://pulp.plan.io/issues/8438 is resolved
34+
def _remove_attr(self):
35+
raise AttributeError
36+
queryset_filtering_required_permission = property(_remove_attr)
37+
3238
@transaction.atomic
3339
def create(self, request, *args, **kwargs):
3440
name = request.data['name']

0 commit comments

Comments
 (0)