mirror of
https://github.com/bitwarden/server.git
synced 2025-05-28 23:04:50 -05:00
Remove obsolete permissions code from ImportCiphersController (#4124)
This commit is contained in:
parent
62c90bc50a
commit
0d2e953459
@ -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)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user