forked from MarseyWorld/MarseyWorld
bypass read only mode perm
parent
b398420246
commit
01138ab592
|
@ -217,6 +217,7 @@ PERMS = { # Minimum admin_level to perform action.
|
||||||
'VIEW_PATRONS': 3, # note: extra check for Aevann, carp, or snakes
|
'VIEW_PATRONS': 3, # note: extra check for Aevann, carp, or snakes
|
||||||
'VIEW_VOTE_BUTTONS_ON_USER_PAGE': 2,
|
'VIEW_VOTE_BUTTONS_ON_USER_PAGE': 2,
|
||||||
'PRINT_MARSEYBUX_FOR_KIPPY_ON_PCMEMES': 3, # note: explicitly disabled on rDrama
|
'PRINT_MARSEYBUX_FOR_KIPPY_ON_PCMEMES': 3, # note: explicitly disabled on rDrama
|
||||||
|
'SITE_BYPASS_READ_ONLY_MODE': 1,
|
||||||
'SITE_SETTINGS': 3,
|
'SITE_SETTINGS': 3,
|
||||||
'SITE_SETTINGS_SIDEBARS_BANNERS_BADGES': 3,
|
'SITE_SETTINGS_SIDEBARS_BANNERS_BADGES': 3,
|
||||||
'SITE_SETTINGS_SNAPPY_QUOTES': 3,
|
'SITE_SETTINGS_SNAPPY_QUOTES': 3,
|
||||||
|
|
|
@ -42,7 +42,7 @@ def get_logged_in_user():
|
||||||
v.client = None
|
v.client = None
|
||||||
|
|
||||||
|
|
||||||
if request.method.lower() != "get" and app.config['SETTINGS']['Read-only 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 >= PERMS['SITE_BYPASS_READ_ONLY_MODE']):
|
||||||
abort(403)
|
abort(403)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue