diff --git a/files/helpers/const.py b/files/helpers/const.py index 5453b28ce..41597212c 100644 --- a/files/helpers/const.py +++ b/files/helpers/const.py @@ -217,6 +217,7 @@ PERMS = { # Minimum admin_level to perform action. 'VIEW_PATRONS': 3, # note: extra check for Aevann, carp, or snakes 'VIEW_VOTE_BUTTONS_ON_USER_PAGE': 2, 'PRINT_MARSEYBUX_FOR_KIPPY_ON_PCMEMES': 3, # note: explicitly disabled on rDrama + 'SITE_BYPASS_READ_ONLY_MODE': 1, 'SITE_SETTINGS': 3, 'SITE_SETTINGS_SIDEBARS_BANNERS_BADGES': 3, 'SITE_SETTINGS_SNAPPY_QUOTES': 3, diff --git a/files/helpers/wrappers.py b/files/helpers/wrappers.py index c49c367b4..859dad106 100644 --- a/files/helpers/wrappers.py +++ b/files/helpers/wrappers.py @@ -42,7 +42,7 @@ def get_logged_in_user(): 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)