Merge pull request #4317 from umami-software/opencode/nimble-planet

Fix board share entity authorization
This commit is contained in:
Mike Cao authored and GitHub committed 2026-06-03 23:43:48 -04:00
commit d659c5746b
7 files changed
+252 -10

No files matched your search

+12
View File
@@ -22,6 +22,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;
}
@@ -46,6 +50,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;
}
@@ -70,6 +78,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;
}