From 039fa606d6ca8b2514c7fe098204cc89287ceaa2 Mon Sep 17 00:00:00 2001 From: justcool393 Date: Wed, 5 Oct 2022 23:22:42 -0700 Subject: [PATCH] streamer permissions --- files/helpers/const.py | 1 + files/routes/static.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/files/helpers/const.py b/files/helpers/const.py index ba4f6dac8..f2fa1e17d 100644 --- a/files/helpers/const.py +++ b/files/helpers/const.py @@ -186,6 +186,7 @@ PERMS = { # Minimum admin_level to perform action. 'NOTIFICATIONS_FOR_SPECIFIC_WPD_COMMENTS': 1, 'MESSAGE_BLOCKED_USERS': 1, 'APPS_MODERATE': 3, + 'STREAMERS_MODERATION': 2, } FEATURES = { diff --git a/files/routes/static.py b/files/routes/static.py index a5dd02036..14a55beb6 100644 --- a/files/routes/static.py +++ b/files/routes/static.py @@ -559,7 +559,7 @@ if SITE == 'pcmemes.net': return render_template('live.html', v=v, live=live, offline=offline) @app.post('/live/add') - @admin_level_required(2) + @admin_level_required(PERMS['STREAMERS_MODERATION']) def live_add(v): link = request.values.get('link').strip() @@ -598,7 +598,7 @@ if SITE == 'pcmemes.net': return redirect('/live') @app.post('/live/remove') - @admin_level_required(2) + @admin_level_required(PERMS['STREAMERS_MODERATION']) def live_remove(v): id = request.values.get('id').strip() if not id: abort(400)