Fix for #1550 (password prompt for LDAP and anonymous browsing)

This commit is contained in:
Ozzieisaacs
2020-11-15 17:16:01 +01:00
parent 70da46b05e
commit ceefba2743
2 changed files with 4 additions and 2 deletions

View File

@@ -51,7 +51,7 @@ def requires_basic_auth_if_no_ano(f):
if not auth or auth.type != 'basic' or not check_auth(auth.username, auth.password):
return authenticate()
return f(*args, **kwargs)
if config.config_login_type == constants.LOGIN_LDAP and services.ldap:
if config.config_login_type == constants.LOGIN_LDAP and services.ldap and config.config_anonbrowse != 1:
return services.ldap.basic_auth_required(f)
return decorated