diff --git a/files/routes/settings.py b/files/routes/settings.py
index 0d01fbfe8..94face50c 100644
--- a/files/routes/settings.py
+++ b/files/routes/settings.py
@@ -851,6 +851,8 @@ def settings_profilecss(v):
@validate_formkey
def settings_block_user(v):
+ if v and v.admin_level: return {"error": "Admins can't block users."}, 403
+
user = get_user(request.values.get("username"), graceful=True)
if not user: return {"error": "That user doesn't exist."}, 404
diff --git a/files/templates/comments.html b/files/templates/comments.html
index c02649c82..cb0907200 100644
--- a/files/templates/comments.html
+++ b/files/templates/comments.html
@@ -373,7 +373,7 @@
Distinguish
{% endif %}
- {% if v and not v.id==c.author_id%}
+ {% if v and not v.id==c.author_id and not v.admin_level %}
Unblock userAre you sure?
@@ -562,7 +562,7 @@
API App
{% endif %}
- {% if not v.id==c.author_id %}
+ {% if not v.id==c.author_id and not v.admin_level %}
Unblock userAre you sure?
diff --git a/files/templates/submission.html b/files/templates/submission.html
index db3ce3721..7cdfe9230 100644
--- a/files/templates/submission.html
+++ b/files/templates/submission.html
@@ -293,7 +293,7 @@
{% endif %}
- {% if v and v.id != p.author_id %}
+ {% if v and v.id != p.author_id and not v.admin_level %}
@@ -611,7 +611,7 @@
API App
{% endif %}
- {% if not v.id==p.author_id %}
+ {% if not v.id==p.author_id and not v.admin_level %}
Unblock userAre you sure?
diff --git a/files/templates/submission_listing.html b/files/templates/submission_listing.html
index b9688933c..76a3368e3 100644
--- a/files/templates/submission_listing.html
+++ b/files/templates/submission_listing.html
@@ -274,7 +274,7 @@
API App
{% endif %}
- {% if not v.id==p.author_id %}
+ {% if not v.id==p.author_id and not v.admin_level %}
Unblock userAre you sure?
@@ -438,7 +438,7 @@
{% endif %}
- {% if v and v.id != p.author_id %}
+ {% if v and v.id != p.author_id and not v.admin_level %}