club and chudrama permissions

master
justcool393 2022-10-05 21:52:15 -07:00
parent 06f88e8a4a
commit 5739f128cf
2 changed files with 7 additions and 4 deletions

View File

@ -414,9 +414,10 @@ class User(Base):
@property
@lazy
def paid_dues(self):
if not FEATURES['COUNTRY_CLUB']:
return True
return not self.shadowbanned and not (self.is_banned and not self.unban_utc) and (self.admin_level or self.club_allowed or (self.club_allowed != False and self.truecoins >= dues))
if not FEATURES['COUNTRY_CLUB']: return True
if self.shadowbanned: return False
if self.is_suspended_permanently: return False
return self.admin_level >= PERMS['VIEW_CLUB'] or self.club_allowed or (self.club_allowed != False and self.truecoins >= dues)
@lazy
def any_block_exists(self, other):
@ -926,7 +927,7 @@ class User(Base):
@property
@lazy
def can_see_chudrama(self):
if self.admin_level: return True
if self.admin_level >= PERMS['VIEW_CHUDRAMA']: return True
if self.client: return True
if self.truecoins >= 5000: return True
if self.agendaposter: return True

View File

@ -150,6 +150,8 @@ PERMS = { # Minimum admin_level to perform action.
'LOTTERY_ADMIN': 3,
'LOTTERY_VIEW_PARTICIPANTS': 2,
'VIEW_MODMAIL': 2,
'VIEW_CLUB': 1,
'VIEW_CHUDRAMA': 1,
'PRINT_MARSEYBUX_FOR_KIPPY_ON_PCMEMES': 3,
'VIEW_ACTIVE_USERS': 2,
'MERGE_USERS': 3, # note: extra check for Aevann