forked from rDrama/rDrama
remove login_required from ddos_detected effects
parent
0e4677d342
commit
9a28e36265
|
@ -134,7 +134,7 @@ def auth_desired(f):
|
|||
def auth_desired_with_logingate(f):
|
||||
def wrapper(*args, **kwargs):
|
||||
v = get_logged_in_user()
|
||||
if not v and (get_setting('login_required') or get_setting('ddos_detected')):
|
||||
if not v and get_setting('login_required'):
|
||||
abort(401, "You need to login to perform this action!")
|
||||
|
||||
if request.path.startswith('/logged_out'):
|
||||
|
|
|
@ -128,8 +128,8 @@
|
|||
{% for setting in SITE_SETTINGS.keys() %}
|
||||
{% if not (setting == "offline_mode" and v.admin_level < PERMS["SITE_OFFLINE_MODE"]) and setting !="ddos_detected" %}
|
||||
<div class="custom-control custom-switch{% if loop.index > 1 %} mt-1{% endif %}" id="settings-{{setting}}-container">
|
||||
{% set disabled = (setting in ("under_attack", "login_required", "signups") and SITE_SETTINGS["ddos_detected"]) %}
|
||||
<input {% if disabled %}disabled {% if setting in ("under_attack", "login_required") %}checked{% endif %}{% endif %} autocomplete="off" type="checkbox" class="custom-control-input" id="settings-{{setting}}-checkbox" {% if SITE_SETTINGS[setting] %}checked{% endif %} data-nonce="{{g.nonce}}" data-onchange="postToastSwitch(this, '/admin/site_settings/{{setting}}');">
|
||||
{% set disabled = (setting in ("under_attack", "signups") and SITE_SETTINGS["ddos_detected"]) %}
|
||||
<input {% if disabled %}disabled {% if setting == "under_attack" %}checked{% endif %}{% endif %} autocomplete="off" type="checkbox" class="custom-control-input" id="settings-{{setting}}-checkbox" {% if SITE_SETTINGS[setting] %}checked{% endif %} data-nonce="{{g.nonce}}" data-onchange="postToastSwitch(this, '/admin/site_settings/{{setting}}');">
|
||||
<label class="custom-control-label" for="settings-{{setting}}-checkbox">{{setting.replace('_', ' ').title()}}</label>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
|
||||
{% set login_namespace = namespace() %}
|
||||
|
||||
{% set login_required = SITE_SETTINGS['login_required'] or SITE_SETTINGS['ddos_detected'] %}
|
||||
{% set login_required = SITE_SETTINGS['login_required'] %}
|
||||
|
||||
{% if ref_user %}
|
||||
{% set login_namespace.authtitle = '@' ~ ref_user.username ~ ' has invited you!' %}
|
||||
|
|
Loading…
Reference in New Issue