core: improve messaging when flow manager denied request
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
36b674349a
commit
2f6e6a3123
|
@ -148,8 +148,7 @@ class SourceFlowManager:
|
|||
def get_flow(self, **kwargs) -> HttpResponse:
|
||||
"""Get the flow response based on user_matching_mode"""
|
||||
action, connection = self.get_action()
|
||||
if not connection:
|
||||
return redirect("/")
|
||||
if connection:
|
||||
if action == Action.LINK:
|
||||
self._logger.debug("Linking existing user")
|
||||
return self.handle_existing_user_link(connection)
|
||||
|
@ -163,7 +162,10 @@ class SourceFlowManager:
|
|||
messages.error(
|
||||
self.request,
|
||||
_(
|
||||
"Request to authenticate with %(source)s has been denied!"
|
||||
(
|
||||
"Request to authenticate with %(source)s has been denied. Please authenticate "
|
||||
"with the source you've previously signed up with."
|
||||
)
|
||||
% {"source": self.source.name}
|
||||
),
|
||||
)
|
||||
|
|
Reference in New Issue