1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-03 00:52:49 -05:00

AC Team code ownership moves - Api project (#3351)

This commit is contained in:
Thomas Rittson
2023-10-19 01:27:56 +10:00
committed by GitHub
parent d230b10f82
commit 37e9d70bee
62 changed files with 109 additions and 89 deletions

View File

@ -0,0 +1,28 @@
using Bit.Api.Auth.Models.Public.Request;
using Bit.Core.Entities;
namespace Bit.Api.AdminConsole.Public.Models.Request;
public class GroupCreateUpdateRequestModel : GroupBaseModel
{
/// <summary>
/// The associated collections that this group can access.
/// </summary>
public IEnumerable<AssociationWithPermissionsRequestModel> Collections { get; set; }
public Group ToGroup(Guid orgId)
{
return ToGroup(new Group
{
OrganizationId = orgId
});
}
public Group ToGroup(Group existingGroup)
{
existingGroup.Name = Name;
existingGroup.AccessAll = AccessAll.Value;
existingGroup.ExternalId = ExternalId;
return existingGroup;
}
}