Skip to content

High performance self-hosted photo and video management solution.

fix(web): prevent partner assets from being selected in geolocation utility (#28737)

okxint13ecfc887693
diff --git a/web/src/routes/(user)/utilities/geolocation/+page.svelte b/web/src/routes/(user)/utilities/geolocation/+page.svelte
index 18287a7b13..061872e42c 100644
--- a/web/src/routes/(user)/utilities/geolocation/+page.svelte
+++ b/web/src/routes/(user)/utilities/geolocation/+page.svelte
@@ -38,6 +38,8 @@
withCoordinates: true,
};
+ const isOwnAsset = (asset: TimelineAsset) => asset.ownerId === authManager.user.id;
+
const handleUpdate = async () => {
if (!point) {
return;
@@ -54,7 +56,7 @@
await updateAssets({
assetBulkUpdateDto: {
- ids: assetMultiSelectManager.assets.map((asset) => asset.id),
+ ids: assetMultiSelectManager.assets.filter((asset) => isOwnAsset(asset)).map((asset) => asset.id),
latitude: point.lat,
longitude: point.lng,
},
@@ -124,7 +126,7 @@
}, 1500);
point = { lat: asset.latitude, lng: asset.longitude };
void setQueryValue('at', asset.id);
- } else {
+ } else if (isOwnAsset(asset)) {
onClick(timelineManager, timelineDay.getAssets(), timelineDay.groupTitle, asset);
}
};
@@ -199,6 +201,9 @@
onThumbnailClick={handleThumbnailClick}
>
{#snippet customThumbnailLayout(asset: TimelineAsset)}
+ {#if !isOwnAsset(asset)}
+ <div class="pointer-events-none absolute inset-0 rounded-sm bg-black/40"></div>
+ {/if}
{#if hasGps(asset)}
<div class="absolute inset-e-3 bottom-1 rounded-xl bg-success px-4 py-1 text-xs text-black transition-colors">
{asset.city || $t('gps')}