From e8bdb6997b16f37f8fb36ab29fcd47aa3da388bf Mon Sep 17 00:00:00 2001 From: Damian Borowiecki Date: Sat, 26 Oct 2024 15:38:06 +0200 Subject: [PATCH] OP-2169: Non admin users with grievance access can get config --- grievance_social_protection/schema.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grievance_social_protection/schema.py b/grievance_social_protection/schema.py index 961ca97..544636c 100644 --- a/grievance_social_protection/schema.py +++ b/grievance_social_protection/schema.py @@ -117,7 +117,7 @@ def resolve_grievance_config(self, info, **kwargs): user = info.context.user if type(user) is AnonymousUser: raise PermissionDenied(_("unauthorized")) - if not user.is_imis_admin: + if not info.context.user.has_perms(TicketConfig.gql_query_tickets_perms): raise PermissionDenied(_("unauthorized")) return GrievanceTypeConfigurationGQLType()