perms: consistently use >= for admin levels

places that use the PERMS constant do it and this way makes it clearer
what admin level is required to perform an action.
This commit is contained in:
justcool393 2023-04-04 04:08:17 -05:00 committed by Ben Rog-Wilhelm
parent 3bbedd7375
commit 688cd91e83
21 changed files with 50 additions and 50 deletions

View file

@ -425,8 +425,8 @@ class User(CreatedBase):
'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 > 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,
'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,
'badges': [x.path for x in self.badges],
}