forked from rDrama/rDrama
unify chudrama and CC's logic
parent
ca259079cd
commit
20eef6e063
|
@ -1041,13 +1041,24 @@ class User(Base):
|
|||
|
||||
@property
|
||||
@lazy
|
||||
def can_see_chudrama(self):
|
||||
def can_see_restricted_holes(self):
|
||||
if self.client: return False
|
||||
if self.blacklisted_by: return False
|
||||
if self.shadowbanned: return False
|
||||
if self.is_suspended_permanently: return False
|
||||
if self.admin_level >= PERMS['VIEW_CHUDRAMA']: return True
|
||||
if self.client: return True
|
||||
if self.truescore >= TRUESCORE_CHUDRAMA_MINIMUM: return True
|
||||
|
||||
if self.admin_level >= PERMS['VIEW_RESTRICTED_HOLES']: return True
|
||||
if self.truescore >= TRUESCORE_RESTRICTED_HOLES_MINIMUM: return True
|
||||
|
||||
return None
|
||||
|
||||
|
||||
@property
|
||||
@lazy
|
||||
def can_see_chudrama(self):
|
||||
if self.can_see_restricted_holes != None:
|
||||
return self.can_see_restricted_holes
|
||||
|
||||
if self.agendaposter: return True
|
||||
if self.patron: return True
|
||||
return False
|
||||
|
@ -1055,12 +1066,11 @@ class User(Base):
|
|||
@property
|
||||
@lazy
|
||||
def can_see_countryclub(self):
|
||||
if self.blacklisted_by: return False
|
||||
if self.shadowbanned: return False
|
||||
if self.is_suspended_permanently: return False
|
||||
if self.agendaposter == 1: return False
|
||||
if self.admin_level >= PERMS['VIEW_CLUB']: return True
|
||||
if self.truescore >= TRUESCORE_CLUB_MINIMUM: return True
|
||||
|
||||
if self.can_see_restricted_holes != None:
|
||||
return self.can_see_restricted_holes
|
||||
|
||||
return False
|
||||
|
||||
@property
|
||||
|
|
|
@ -438,8 +438,7 @@ PERMS = { # Minimum admin_level to perform action.
|
|||
'POST_COMMENT_DISTINGUISH': 1,
|
||||
'POST_BYPASS_REPOST_CHECKING': 1,
|
||||
'POST_IN_GHOST_THREADS': 1,
|
||||
'VIEW_CLUB': 1,
|
||||
'VIEW_CHUDRAMA': 1,
|
||||
'VIEW_RESTRICTED_HOLES': 1,
|
||||
'SITE_BYPASS_READ_ONLY_MODE': 1,
|
||||
'SITE_BYPASS_UNDER_SIEGE_MODE': 1,
|
||||
'SITE_WARN_ON_INVALID_AUTH': 1,
|
||||
|
@ -631,8 +630,7 @@ COSMETIC_AWARD_COIN_AWARD_PCT = 0.10
|
|||
TRUESCORE_CHAT_MINIMUM = 0
|
||||
TRUESCORE_GHOST_MINIMUM = 0
|
||||
TRUESCORE_DONATE_MINIMUM = 10
|
||||
TRUESCORE_CLUB_MINIMUM = 100
|
||||
TRUESCORE_CHUDRAMA_MINIMUM = 10
|
||||
TRUESCORE_RESTRICTED_HOLES_MINIMUM = 100
|
||||
|
||||
LOGGEDIN_ACTIVE_TIME = 15 * 60
|
||||
PFP_DEFAULT_MARSEY = True
|
||||
|
|
Loading…
Reference in New Issue