1
0
mirror of https://github.com/bitwarden/server.git synced 2025-06-30 15:42:48 -05:00

Permissions bugs (#1083)

* Null checked org invite collections

* Null checked permissions on org invite

* Gave a static seat count to org invite fixture

* Null checked the right way
This commit is contained in:
Addison Beck
2021-01-13 15:14:28 -05:00
committed by GitHub
parent 96cc88aafc
commit 9f938f5efd
4 changed files with 29 additions and 5 deletions

View File

@ -1022,11 +1022,15 @@ namespace Bit.Core.Services
ExternalId = externalId,
CreationDate = DateTime.UtcNow,
RevisionDate = DateTime.UtcNow,
Permissions = System.Text.Json.JsonSerializer.Serialize(invite.Permissions, new JsonSerializerOptions
};
if (invite.Permissions != null)
{
orgUser.Permissions = System.Text.Json.JsonSerializer.Serialize(invite.Permissions, new JsonSerializerOptions
{
PropertyNamingPolicy = JsonNamingPolicy.CamelCase,
}),
};
});
}
if (!orgUser.AccessAll && invite.Collections.Any())
{