Skip to content

Commit

Permalink
Merge branch 'master' into fix-tide-maxpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
saviit authored Mar 6, 2025
2 parents 102cde3 + e115d59 commit ed33f27
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions timApp/auth/login.py
Original file line number Diff line number Diff line change
Expand Up @@ -580,7 +580,9 @@ def save_came_from() -> None:


@login_page.get("/quickLogin/<username>")
def quick_login(username: str, redirect: bool = True) -> Response:
def quick_login(
username: str, redirect: bool = True, restore_on_logout: bool = True
) -> Response:
"""Logs in as another user."""
user = User.get_by_name(username)
curr_user = get_restored_context_user()
Expand Down Expand Up @@ -608,7 +610,7 @@ def quick_login(username: str, redirect: bool = True) -> Response:
else:
verify_admin(user=curr_user)

set_single_user_to_session(user, restore_on_logout=True)
set_single_user_to_session(user, restore_on_logout=restore_on_logout)
db.session.commit()
flash(f"Temporarily logged in as: {username}")

Expand Down

0 comments on commit ed33f27

Please sign in to comment.