mirror of
https://github.com/bitwarden/server
synced 2026-01-14 22:43:19 +00:00
[AC-1139] Updated BulkCollectionAuthorizationHandler to not fail if the resource list is null or empty.
This commit is contained in:
@@ -44,14 +44,12 @@ public class BulkCollectionAuthorizationHandler : BulkAuthorizationHandler<Colle
|
||||
// Establish pattern of authorization handler null checking passed resources
|
||||
if (resources == null || !resources.Any() || !_currentContext.UserId.HasValue)
|
||||
{
|
||||
context.Fail();
|
||||
return;
|
||||
}
|
||||
|
||||
var targetOrganizationId = resources.FirstOrDefault()?.OrganizationId ?? default;
|
||||
if (targetOrganizationId == default)
|
||||
{
|
||||
context.Fail();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user