forked from rDrama/rDrama
users: is_visible_to is False if v doesn't exist
this lets us use this function even with a logged out usermaster
parent
d1e35e4afe
commit
5af772c1f9
|
@ -747,6 +747,7 @@ class User(Base):
|
|||
@lazy
|
||||
def is_visible_to(self, user) -> bool:
|
||||
if not self.is_private: return True
|
||||
if not user: return False
|
||||
if self.id == user.id: return True
|
||||
return user.admin_level >= PERMS['VIEW_PRIVATE_PROFILES'] or user.eye
|
||||
|
||||
|
|
Loading…
Reference in New Issue