Commit 52c423fd authored by Dmitry Shelepnev's avatar Dmitry Shelepnev
Browse files

Fix error in sopds_login decorator (enabled auth with SOPDS_AUTH=False)

parent 50314ec4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -19,7 +19,7 @@ from sopds_web_backend.settings import HALF_PAGES_LINKS

def sopds_login(function=None, redirect_field_name=REDIRECT_FIELD_NAME, url=None):
    actual_decorator = user_passes_test(
        lambda u: u.is_authenticated(),
        lambda u: (u.is_authenticated() if AUTH else True),
        login_url=reverse_lazy(url),
        redirect_field_name=redirect_field_name
    )