From 193c0e7c817ec063a02234ce7c68e2733d4b86c1 Mon Sep 17 00:00:00 2001 From: Nico Virkki Date: Tue, 7 May 2024 14:08:32 +0300 Subject: [PATCH] feat: add feature flag for checking allowed data fields Adds setting for allowed data field check named as: ENABLE_ALLOWED_DATA_FIELDS_RESTRICTION The setting defaults False. When False, app logs a warning message when there is a query trying to access a field which is not in service's allowed_data_fields Refs HP-2319 --- open_city_profile/graphene.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/open_city_profile/graphene.py b/open_city_profile/graphene.py index 36718b37..0e97e35e 100644 --- a/open_city_profile/graphene.py +++ b/open_city_profile/graphene.py @@ -208,7 +208,7 @@ def resolve(self, next, root, info, **kwargs): raise FieldNotAllowedError("Field is not allowed for service.") logging.warning( - "Allowed data field exception would occur. Field (%s) is not allowed for service %s.", + "Allowed data field exception would occur: Field (%s) is not allowed for service %s.", field_name, info.context.service, )