mirror of
https://github.com/bitwarden/server.git
synced 2025-07-02 16:42:50 -05:00
29 lines
754 B
C#
29 lines
754 B
C#
using Bit.Api.Auth.Models.Public.Request;
|
|
using Bit.Core.AdminConsole.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;
|
|
}
|
|
}
|