main
bashrc 2026-04-05 12:45:57 +01:00
parent f2571e380f
commit 779dac3ffa
2 changed files with 5 additions and 2 deletions

View File

@ -26,6 +26,9 @@ def redirect_to_login_screen(self, calling_domain: str, path: str,
news_instance: bool, fitness: {}) -> bool: news_instance: bool, fitness: {}) -> bool:
"""Redirects to the login screen if necessary """Redirects to the login screen if necessary
""" """
if authorized:
return False
divert_to_login_screen = False divert_to_login_screen = False
non_login_paths = ('/media/', '/ontologies/', '/data/', '/sharefiles/', non_login_paths = ('/media/', '/ontologies/', '/data/', '/sharefiles/',
'/statuses/', '/emoji/', '/tags/', '/tagmaps/', '/statuses/', '/emoji/', '/tags/', '/tagmaps/',
@ -43,7 +46,7 @@ def redirect_to_login_screen(self, calling_domain: str, path: str,
if string_ends_with(path, possible_endings): if string_ends_with(path, possible_endings):
divert_to_login_screen = False divert_to_login_screen = False
if divert_to_login_screen and not authorized: if divert_to_login_screen:
divert_path = '/login' divert_path = '/login'
if news_instance: if news_instance:
# for news instances if not logged in then show the # for news instances if not logged in then show the

View File

@ -1,4 +1,4 @@
__filename__ = "pwa.py" __filename__ = "webapp_pwa.py"
__author__ = "Bob Mottram" __author__ = "Bob Mottram"
__license__ = "AGPL3+" __license__ = "AGPL3+"
__version__ = "1.7.0" __version__ = "1.7.0"