Skip to content

Commit

Permalink
feat: add feature flag for checking allowed data fields
Browse files Browse the repository at this point in the history
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
  • Loading branch information
nicobav committed May 22, 2024
1 parent 6e28a10 commit 193c0e7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion open_city_profile/graphene.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
Expand Down

0 comments on commit 193c0e7

Please sign in to comment.