mirror of
https://github.com/bitwarden/server.git
synced 2025-07-16 23:27:30 -05: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