bypass read only mode perm

master
justcool393 2022-10-11 00:54:02 -07:00
parent b398420246
commit 01138ab592
2 changed files with 2 additions and 1 deletions

View File

@ -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,

View File

@ -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)