remove NOTIFICATIONS_OFFSITE perm for being cringe

pull/225/head
Aevann 2024-02-29 01:59:45 +02:00
parent 3ecf2aa05f
commit b6b573aa2b
2 changed files with 1 additions and 7 deletions

View File

@ -559,11 +559,6 @@ class User(Base):
discount = 100 - int(self.award_discount * 100)
return f'{discount}%'
@property
@lazy
def can_view_offsite_mentions(self):
return self.offsite_mentions or self.admin_level >= PERMS['NOTIFICATIONS_OFFSITE']
@lazy
def can_edit(self, target):
if isinstance(target, Comment) and not target.post: return False
@ -891,7 +886,7 @@ class User(Base):
@property
@lazy
def offsite_notifications_count(self):
if not self.can_view_offsite_mentions:
if not self.offsite_mentions:
return 0
return g.db.query(Comment).filter(
Comment.created_utc > self.last_viewed_offsite_notifs,

View File

@ -154,7 +154,6 @@ PERMS = { # Minimum admin_level to perform action.
'BYPASS_CHAT_TRUESCORE_REQUIREMENT': 1,
'BYPASS_ANTISPAM_CHECKS': 1,
'WARN_ON_FAILED_LOGIN': 1,
'NOTIFICATIONS_OFFSITE': 1,
'NOTIFICATIONS_SPECIFIC_WPD_COMMENTS': 1,
'MESSAGE_BLOCKED_USERS': 1,
'ADMIN_MOP_VISIBLE': 1,