Skip to content

Commit

Permalink
Merge pull request #24 from openimis/bugfix/OP-2169
Browse files Browse the repository at this point in the history
OP-2169: Non admin users with grievance access can get config
  • Loading branch information
delcroip authored Oct 28, 2024
2 parents 1a0deb4 + e8bdb69 commit 1e7f9ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion grievance_social_protection/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down

0 comments on commit 1e7f9ba

Please sign in to comment.