diff --git a/files/classes/user.py b/files/classes/user.py index 32c8e0751..d01a11210 100644 --- a/files/classes/user.py +++ b/files/classes/user.py @@ -174,7 +174,7 @@ class User(Base): def can_manage_reports(self): - return self.admin_level > 2 + return self.admin_level > 1 def should_comments_be_filtered(self): if self.admin_level > 0: @@ -550,8 +550,8 @@ class User(Base): 'profile_url': self.profile_url, 'bannerurl': self.banner_url, 'bio_html': self.bio_html_eager, - 'post_count': 0 if self.shadowbanned and not (v and (v.shadowbanned or v.admin_level > 2)) else self.post_count, - 'comment_count': 0 if self.shadowbanned and not (v and (v.shadowbanned or v.admin_level > 2)) else self.comment_count, + 'post_count': 0 if self.shadowbanned and not (v and (v.shadowbanned or v.admin_level > 1)) else self.post_count, + 'comment_count': 0 if self.shadowbanned and not (v and (v.shadowbanned or v.admin_level > 1)) else self.comment_count, 'badges': [x.path for x in self.badges], 'notes': [x.json() for x in self.notes] } diff --git a/files/helpers/get.py b/files/helpers/get.py index cae403be2..de464469f 100644 --- a/files/helpers/get.py +++ b/files/helpers/get.py @@ -254,7 +254,7 @@ def get_comments(cids, v=None, load_parent=False): blocked.c.target_id, ).filter(Comment.id.in_(cids)) - if not (v and (v.shadowbanned or v.admin_level > 2)): + if not (v and (v.shadowbanned or v.admin_level > 1)): comments = comments.join(User, User.id == Comment.author_id).filter(User.shadowbanned == None) comments = comments.join( diff --git a/files/routes/admin.py b/files/routes/admin.py index 026f7cd3e..daf73ec59 100644 --- a/files/routes/admin.py +++ b/files/routes/admin.py @@ -1335,7 +1335,7 @@ def sticky_post(post_id, v): if post and not post.stickied: pins = g.db.query(Submission.id).filter(Submission.stickied != None, Submission.is_banned == False).count() if pins > 2: - if v.admin_level > 2: + if v.admin_level > 1: post.stickied = v.username post.stickied_utc = int(time.time()) + 3600 else: return {"error": "Can't exceed 3 pinned posts limit!"}, 403 diff --git a/files/routes/comments.py b/files/routes/comments.py index 70804b6ab..903e7cf76 100644 --- a/files/routes/comments.py +++ b/files/routes/comments.py @@ -174,10 +174,6 @@ def api_comment(v): body = request.values.get("body", "").strip()[:10000] - if v.admin_level > 2 and parent_post.id == 37749 and level == 1: - with open(f"snappy_{SITE_ID}.txt", "a", encoding="utf-8") as f: - f.write('\n{[para]}\n' + body) - if parent_post.id not in ADMINISTRATORS: if v.longpost and (len(body) < 280 or ' [](' in body or body.startswith('[](')): return {"error":"You have to type more than 280 characters!"}, 403 diff --git a/files/templates/comments.html b/files/templates/comments.html index a402743a6..340e24a86 100644 --- a/files/templates/comments.html +++ b/files/templates/comments.html @@ -48,7 +48,7 @@ {% set downs=c.downvotes %} {% set score=ups-downs %} -{% if v and (v.shadowbanned or v.admin_level > 2) %} +{% if v and (v.shadowbanned or v.admin_level > 1) %} {% set replies=c.replies_ignoring_shadowbans %} {% else %} {% set replies=c.replies(v) %} @@ -199,7 +199,7 @@ {{c.print()}} {% endif %} {{c.author_name}} - {% if v and v.admin_level > 2 %} + {% if v and v.admin_level > 1 %} 2 and c.filter_state == 'filtered' %} + {% if v and v.admin_level > 1 and c.filter_state == 'filtered' %} {% endif %} @@ -825,7 +825,7 @@ {% if v and v.admin_level > 1 %} - {% if v.admin_level > 2 %} + {% if v.admin_level > 1 %} {% endif %} {% endif %} diff --git a/files/templates/post_actions.html b/files/templates/post_actions.html index 56fb6d79b..5bbe3d05d 100644 --- a/files/templates/post_actions.html +++ b/files/templates/post_actions.html @@ -33,7 +33,7 @@ Delete {% endif %} - {% if v and v.admin_level > 2 and p.filter_state == 'filtered' %} + {% if v and v.admin_level > 1 and p.filter_state == 'filtered' %} Approve Remove {% endif %} diff --git a/files/templates/submission.html b/files/templates/submission.html index dafc85c2a..20cbb044e 100644 --- a/files/templates/submission.html +++ b/files/templates/submission.html @@ -185,7 +185,7 @@ {% endif %} {{p.author_name}}{% if p.author.customtitle %}  {{p.author.customtitle | safe}}{% endif %} - {% if v and v.admin_level > 2 %} + {% if v and v.admin_level > 1 %} {% endif %} -{% if v and v.admin_level > 2 %} +{% if v and v.admin_level > 1 %} {% endif %} @@ -219,7 +219,7 @@ class="mod" {% endif %}>{{p.author_name}} {% if p.author.customtitle %}  {{p.author.customtitle | safe}}{% endif %} - {% if v and v.admin_level > 2 %} + {% if v and v.admin_level > 1 %}