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 @property
@lazy @lazy
def paid_dues(self): def paid_dues(self):
if not FEATURES['COUNTRY_CLUB']: if not FEATURES['COUNTRY_CLUB']: return True
return True if self.shadowbanned: return False
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 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 @lazy
def any_block_exists(self, other): def any_block_exists(self, other):
@ -926,7 +927,7 @@ class User(Base):
@property @property
@lazy @lazy
def can_see_chudrama(self): 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.client: return True
if self.truecoins >= 5000: return True if self.truecoins >= 5000: return True
if self.agendaposter: return True if self.agendaposter: return True

View File

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