fsd
This commit is contained in:
parent
ce48cc7282
commit
de84a302df
4 changed files with 6 additions and 6 deletions
|
@ -185,7 +185,7 @@ ACTIONTYPES = {
|
||||||
"icon": 'fa-gas-pump-slash',
|
"icon": 'fa-gas-pump-slash',
|
||||||
"color": 'bg-danger'
|
"color": 'bg-danger'
|
||||||
},
|
},
|
||||||
'disable_Readonly mode': {
|
'disable_Read-only mode': {
|
||||||
"str": 'disabled readonly mode',
|
"str": 'disabled readonly mode',
|
||||||
"icon": 'fa-book',
|
"icon": 'fa-book',
|
||||||
"color": 'bg-danger'
|
"color": 'bg-danger'
|
||||||
|
@ -235,7 +235,7 @@ ACTIONTYPES = {
|
||||||
"icon": 'fa-gas-pump',
|
"icon": 'fa-gas-pump',
|
||||||
"color": 'bg-success'
|
"color": 'bg-success'
|
||||||
},
|
},
|
||||||
'enable_Readonly mode': {
|
'enable_Read-only mode': {
|
||||||
"str": 'enabled readonly mode',
|
"str": 'enabled readonly mode',
|
||||||
"icon": 'fa-book',
|
"icon": 'fa-book',
|
||||||
"color": 'bg-success'
|
"color": 'bg-success'
|
||||||
|
|
|
@ -31,7 +31,7 @@ def get_logged_in_user():
|
||||||
elif not v.validate_formkey(submitted_key): abort(401)
|
elif not v.validate_formkey(submitted_key): abort(401)
|
||||||
|
|
||||||
|
|
||||||
if request.method.lower() != "get" and app.config['SETTINGS']['Readonly mode'] and not (v and v.admin_level):
|
if request.method.lower() != "get" and app.config['SETTINGS']['Read-only mode'] and not (v and v.admin_level):
|
||||||
abort(403)
|
abort(403)
|
||||||
|
|
||||||
return v
|
return v
|
||||||
|
|
|
@ -75,8 +75,8 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="custom-control custom-switch">
|
<div class="custom-control custom-switch">
|
||||||
<input autocomplete="off" type="checkbox" class="custom-control-input" id="Readonly mode" {% if site_settings['Readonly mode'] %}checked{% endif %} onchange="post_toast(this,'/admin/site_settings/Readonly mode');">
|
<input autocomplete="off" type="checkbox" class="custom-control-input" id="Read-only mode" {% if site_settings['Read-only mode'] %}checked{% endif %} onchange="post_toast(this,'/admin/site_settings/Read-only mode');">
|
||||||
<label class="custom-control-label" for="Readonly mode">Readonly mode</label>
|
<label class="custom-control-label" for="Read-only mode">Read-only mode</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="custom-control custom-switch">
|
<div class="custom-control custom-switch">
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
{"Bots": true, "Fart mode": false, "Readonly mode": false, "Signups": true}
|
{"Bots": true, "Fart mode": false, "Read-only mode": false, "Signups": true}
|
Loading…
Add table
Add a link
Reference in a new issue