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:
parent
3bbedd7375
commit
688cd91e83
21 changed files with 50 additions and 50 deletions
|
@ -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],
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue