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