Skip to content

Commit

Permalink
Fix webserver always redirecting to home page if user was not logged in
Browse files Browse the repository at this point in the history
  • Loading branch information
csp33 committed Jan 17, 2024
1 parent 13b0930 commit 2860427
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions airflow/www/auth.py
Expand Up @@ -116,7 +116,7 @@ def wraps(self, *args, **kwargs):
else:
log.warning(LOGMSG_ERR_SEC_ACCESS_DENIED, permission_str, self.__class__.__name__)
flash(as_unicode(FLAMSG_ERR_SEC_ACCESS_DENIED), "danger")
return redirect(get_auth_manager().get_url_login(next=request.url))
return redirect(get_auth_manager().get_url_login(next_url=request.url))

f._permission_name = permission_str
return functools.update_wrapper(wraps, f)
Expand Down Expand Up @@ -173,7 +173,7 @@ def _has_access(*, is_authorized: bool, func: Callable, args, kwargs):
403,
)
elif not get_auth_manager().is_logged_in():
return redirect(get_auth_manager().get_url_login(next=request.url))
return redirect(get_auth_manager().get_url_login(next_url=request.url))
else:
access_denied = get_access_denied_message()
flash(access_denied, "danger")
Expand Down

0 comments on commit 2860427

Please sign in to comment.