refactor: run formatter

This commit is contained in:
Elias Schneider
2024-07-30 08:39:22 +02:00
parent 3505669135
commit 93aacca9b4
3 changed files with 19 additions and 9 deletions

View File

@@ -63,9 +63,12 @@ export class ShareSecurityGuard extends JwtGuard {
const user = request.user as User;
// Only the creator and reverse share creator can access the reverse share if it's not public
if (share.reverseShare && !share.reverseShare.publicAccess
&& share.creatorId !== user?.id
&& share.reverseShare.creatorId !== user?.id)
if (
share.reverseShare &&
!share.reverseShare.publicAccess &&
share.creatorId !== user?.id &&
share.reverseShare.creatorId !== user?.id
)
throw new ForbiddenException(
"Only reverse share creator can access this share",
"private_share",