From 0d2e953459e2b798f4a27200a96ee98436a4b609 Mon Sep 17 00:00:00 2001 From: Thomas Rittson <31796059+eliykat@users.noreply.github.com> Date: Mon, 27 May 2024 10:58:04 +1000 Subject: [PATCH] Remove obsolete permissions code from ImportCiphersController (#4124) --- src/Api/Tools/Controllers/ImportCiphersController.cs | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/Api/Tools/Controllers/ImportCiphersController.cs b/src/Api/Tools/Controllers/ImportCiphersController.cs index fab5037040..0d07d5bc47 100644 --- a/src/Api/Tools/Controllers/ImportCiphersController.cs +++ b/src/Api/Tools/Controllers/ImportCiphersController.cs @@ -24,7 +24,6 @@ public class ImportCiphersController : Controller private readonly GlobalSettings _globalSettings; private readonly ICollectionRepository _collectionRepository; private readonly IAuthorizationService _authorizationService; - private readonly IOrganizationRepository _organizationRepository; public ImportCiphersController( ICipherService cipherService, @@ -43,7 +42,6 @@ public class ImportCiphersController : Controller _globalSettings = globalSettings; _collectionRepository = collectionRepository; _authorizationService = authorizationService; - _organizationRepository = organizationRepository; } [HttpPost("import")] @@ -98,13 +96,6 @@ public class ImportCiphersController : Controller return true; } - //If flexible collections is disabled the user cannot continue with the import - var orgFlexibleCollections = await _organizationRepository.GetByIdAsync(orgId); - if (!orgFlexibleCollections?.FlexibleCollections ?? false) - { - return false; - } - //Users allowed to import if they CanCreate Collections if (!(await _authorizationService.AuthorizeAsync(User, collections, BulkCollectionOperations.Create)).Succeeded) {