From 9bb7b3758f5a41b5ae0a6732a45d6a8f43278400 Mon Sep 17 00:00:00 2001 From: justcool393 Date: Wed, 5 Oct 2022 21:19:11 -0700 Subject: [PATCH] distinguish stuff --- files/helpers/const.py | 1 + files/routes/admin.py | 4 ++-- files/templates/comments.html | 2 +- files/templates/post_actions.html | 2 +- files/templates/post_admin_actions_mobile.html | 4 ++-- 5 files changed, 7 insertions(+), 6 deletions(-) diff --git a/files/helpers/const.py b/files/helpers/const.py index 6b073b502..64cddcfa3 100644 --- a/files/helpers/const.py +++ b/files/helpers/const.py @@ -128,6 +128,7 @@ PERMS = { # Minimum admin_level to perform action. 'USER_FOLLOWS_VISIBLE': 0, 'USER_VOTERS_VISIBLE': 0, 'POST_COMMENT_MODERATION': 2, + 'POST_COMMENT_DISTINGUISH': 1, 'GLOBAL_HOLE_MODERATION': 3, 'POST_EDITING': 3, 'USER_BADGES': 2, diff --git a/files/routes/admin.py b/files/routes/admin.py index cac8c6179..42c7bead9 100644 --- a/files/routes/admin.py +++ b/files/routes/admin.py @@ -1176,7 +1176,7 @@ def approve_post(post_id, v): @app.post("/distinguish/") -@admin_level_required(1) +@admin_level_required(PERMS['POST_COMMENT_DISTINGUISH']) def distinguish_post(post_id, v): post = get_post(post_id) @@ -1357,7 +1357,7 @@ def approve_comment(c_id, v): @app.post("/distinguish_comment/") -@admin_level_required(1) +@admin_level_required(PERMS['POST_COMMENT_DISTINGUISH']) def admin_distinguish_comment(c_id, v): diff --git a/files/templates/comments.html b/files/templates/comments.html index 18618c3a4..fefc030e2 100644 --- a/files/templates/comments.html +++ b/files/templates/comments.html @@ -432,7 +432,7 @@