From 1228a82775a4f89feb6b8ff447985c108dbabaa8 Mon Sep 17 00:00:00 2001 From: Vincent Wilms Date: Thu, 14 Nov 2024 20:00:38 +0100 Subject: [PATCH] Fix SetMetadataAsync implementation --- src/Nexus/API/v1/CatalogsController.cs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/Nexus/API/v1/CatalogsController.cs b/src/Nexus/API/v1/CatalogsController.cs index 64c0d4bd..c4cc7909 100644 --- a/src/Nexus/API/v1/CatalogsController.cs +++ b/src/Nexus/API/v1/CatalogsController.cs @@ -489,13 +489,8 @@ public Task { catalogId = WebUtility.UrlDecode(catalogId); - var response = ProtectCatalogAsync(catalogId, ensureReadable: true, ensureWritable: false, async catalogContainer => + var response = ProtectCatalogAsync(catalogId, ensureReadable: false, ensureWritable: true, async catalogContainer => { - var canEdit = AuthUtilities.IsCatalogWritable(catalogId, catalogContainer.Metadata, User); - - if (!canEdit) - return StatusCode(StatusCodes.Status403Forbidden, $"The current user is not permitted to modify the catalog {catalogId}."); - await catalogContainer.UpdateMetadataAsync(metadata); return new object();