Support for putting %(consent_uri)s in messages

Make it possible to put the URI in the error message and the server notice that
get sent by the server
This commit is contained in:
Richard van der Hoff 2018-05-23 15:24:31 +01:00
parent 9e8ab0a4f4
commit 82191b08f6
3 changed files with 50 additions and 7 deletions

View file

@ -575,8 +575,11 @@ class EventCreationHandler(object):
return
consent_uri = self._consent_uri_builder.build_user_consent_uri(user_id)
msg = self.config.block_events_without_consent_error % {
'consent_uri': consent_uri,
}
raise ConsentNotGivenError(
msg=self.config.block_events_without_consent_error,
msg=msg,
consent_uri=consent_uri,
)