Allow API clients to view !YOU! submissions.
parent
0c405e6b86
commit
d8204e3a00
|
@ -1000,7 +1000,7 @@ class User(Base):
|
||||||
if not cls.can_see(user, other.author): return False
|
if not cls.can_see(user, other.author): return False
|
||||||
if user and user.id == other.author_id: return True
|
if user and user.id == other.author_id: return True
|
||||||
if isinstance(other, Submission):
|
if isinstance(other, Submission):
|
||||||
if "!YOU!" in other.title and not (user and user.truescore > 5000): return False
|
if "!YOU!" in other.title and not (user and (user.client or user.truescore > 5000)): return False
|
||||||
if other.sub and not cls.can_see(user, other.subr): return False
|
if other.sub and not cls.can_see(user, other.subr): return False
|
||||||
else:
|
else:
|
||||||
if not other.parent_submission:
|
if not other.parent_submission:
|
||||||
|
@ -1016,7 +1016,6 @@ class User(Base):
|
||||||
return (user and user.id == other.id) or (user and user.can_see_shadowbanned) or not other.shadowbanned
|
return (user and user.id == other.id) or (user and user.can_see_shadowbanned) or not other.shadowbanned
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
@lazy
|
@lazy
|
||||||
def can_see_chudrama(self):
|
def can_see_chudrama(self):
|
||||||
|
|
Loading…
Reference in New Issue