updated login_required_if_no_ano to correct switch anonymous on/off when changed in admin
This commit is contained in:
parent
7ade2ecd35
commit
cc758517e7
|
@ -384,9 +384,12 @@ app.jinja_env.globals['url_for_other_page'] = url_for_other_page
|
||||||
|
|
||||||
|
|
||||||
def login_required_if_no_ano(func):
|
def login_required_if_no_ano(func):
|
||||||
if config.config_anonbrowse == 1:
|
@wraps(func)
|
||||||
return func
|
def decorated_view(*args, **kwargs):
|
||||||
return login_required(func)
|
if config.config_anonbrowse == 1:
|
||||||
|
return func(*args, **kwargs)
|
||||||
|
return login_required(func)(*args, **kwargs)
|
||||||
|
return decorated_view
|
||||||
|
|
||||||
|
|
||||||
def remote_login_required(f):
|
def remote_login_required(f):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user