From eda122351660a38a0388b9c7faad5e3e17933343 Mon Sep 17 00:00:00 2001 From: Yohan Boniface Date: Mon, 9 Sep 2024 18:46:59 +0200 Subject: [PATCH] fix: do not show "Attache to my account" button if no logged in user --- umap/static/umap/js/modules/permissions.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/umap/static/umap/js/modules/permissions.js b/umap/static/umap/js/modules/permissions.js index 3c97ec81..307aee03 100644 --- a/umap/static/umap/js/modules/permissions.js +++ b/umap/static/umap/js/modules/permissions.js @@ -117,7 +117,7 @@ export class MapPermissions { const builder = new U.FormBuilder(this, fields) const form = builder.build() container.appendChild(form) - if (this.isAnonymousMap() && this.map.options.user) { + if (this.isAnonymousMap() && this.map.options.user?.id) { // We have a user, and this user has come through here, so they can edit the map, so let's allow to own the map. // Note: real check is made on the back office anyway. const advancedActions = DomUtil.createFieldset(