diff --git a/files/classes/comment.py b/files/classes/comment.py index ca0b9828d..9fc283537 100644 --- a/files/classes/comment.py +++ b/files/classes/comment.py @@ -357,7 +357,7 @@ class Comment(Base): if any([x in self.body for x in v.filter_words]): return True - if self.is_banned: return True + if self.is_banned or self.author.shadowbanned: return True return False diff --git a/files/routes/admin.py b/files/routes/admin.py index cb3118e40..ab33ddcfd 100644 --- a/files/routes/admin.py +++ b/files/routes/admin.py @@ -626,9 +626,10 @@ def admin_link_accounts(v): def admin_removed(v): page = int(request.values.get("page", 1)) + + shadowbanned = [x[0] for x in g.db.query(User.id).options(lazyload('*')).filter(User.shadowbanned != None).all()] - ids = g.db.query(Submission.id).options(lazyload('*')).filter_by(is_banned=True).order_by( - Submission.id.desc()).offset(25 * (page - 1)).limit(26).all() + ids = g.db.query(Submission.id).options(lazyload('*')).filter(or_(Submission.is_banned==True, Submission.id.in_(shadowbanned))).order_by(Submission.id.desc()).offset(25 * (page - 1)).limit(26).all() ids=[x[0] for x in ids] diff --git a/files/templates/comments.html b/files/templates/comments.html index b8be729fc..3c07ea906 100644 --- a/files/templates/comments.html +++ b/files/templates/comments.html @@ -109,7 +109,7 @@ {% set downs=c.downvotes %} {% set score=ups-downs %} -{% if v and v.shadowbanned %} +{% if v and (v.shadowbanned or v.admin_level == 6) %} {% set replies=c.replies3 %} {% else %} {% set replies=c.replies %}