Fix board share entity authorization

This commit is contained in:
Mike Cao committed 2026-06-03 00:02:54 -07:00
1 parent 0f36990040
commit a5f4a39f2b
7 files changed
+236 -10

No files matched your search

+12
View File
@@ -18,6 +18,10 @@ export async function canViewPixel({ user, shareToken }: Auth, pixelId: string)
const pixel = await getPixel(pixelId);
if (!pixel) {
return false;
}
if (pixel.userId) {
return user.id === pixel.userId;
}
@@ -42,6 +46,10 @@ export async function canUpdatePixel({ user }: Auth, pixelId: string) {
const pixel = await getPixel(pixelId);
if (!pixel) {
return false;
}
if (pixel.userId) {
return user.id === pixel.userId;
}
@@ -66,6 +74,10 @@ export async function canDeletePixel({ user }: Auth, pixelId: string) {
const pixel = await getPixel(pixelId);
if (!pixel) {
return false;
}
if (pixel.userId) {
return user.id === pixel.userId;
}