Skip to content

Commit

Permalink
chore: Added auto login decorator to auth_required method.
Browse files Browse the repository at this point in the history
  • Loading branch information
osala-eng committed Sep 27, 2023
1 parent 61053f7 commit 3478faa
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions web/utils/layout.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
get_space_data_source_choice_by_type,
get_system_settings,
handle_archive_org,
handle_auto_login,
handle_chat_input,
handle_create_new_chat,
handle_create_org,
Expand Down Expand Up @@ -264,6 +265,7 @@ def public_access() -> None:
__always_hidden_pages()


@handle_auto_login
def auth_required(show_login_form: bool = True, requiring_admin: bool = False, show_logout_button: bool = True) -> bool:
"""Decide layout based on current user's access."""
auth = get_auth_session()
Expand Down

0 comments on commit 3478faa

Please sign in to comment.