mirror of
https://github.com/bitwarden/server.git
synced 2025-07-01 08:02:49 -05:00
group access all and readonly schema changes
This commit is contained in:
@ -11,6 +11,8 @@ namespace Bit.Core.Models.Api
|
||||
[Required]
|
||||
[StringLength(300)]
|
||||
public string Name { get; set; }
|
||||
[Required]
|
||||
public bool? AccessAll { get; set; }
|
||||
public IEnumerable<string> CollectionIds { get; set; }
|
||||
|
||||
public Group ToGroup(Guid orgId)
|
||||
@ -24,6 +26,7 @@ namespace Bit.Core.Models.Api
|
||||
public Group ToGroup(Group existingGroup)
|
||||
{
|
||||
existingGroup.Name = Name;
|
||||
existingGroup.AccessAll = AccessAll.Value;
|
||||
return existingGroup;
|
||||
}
|
||||
}
|
||||
|
@ -17,11 +17,13 @@ namespace Bit.Core.Models.Api
|
||||
Id = group.Id.ToString();
|
||||
OrganizationId = group.OrganizationId.ToString();
|
||||
Name = group.Name;
|
||||
AccessAll = group.AccessAll;
|
||||
}
|
||||
|
||||
public string Id { get; set; }
|
||||
public string OrganizationId { get; set; }
|
||||
public string Name { get; set; }
|
||||
public bool AccessAll { get; set; }
|
||||
}
|
||||
|
||||
public class GroupDetailsResponseModel : GroupResponseModel
|
||||
|
11
src/Core/Models/Table/CollectionGroup.cs
Normal file
11
src/Core/Models/Table/CollectionGroup.cs
Normal file
@ -0,0 +1,11 @@
|
||||
using System;
|
||||
|
||||
namespace Bit.Core.Models.Table
|
||||
{
|
||||
public class CollectionGroup
|
||||
{
|
||||
public Guid CollectionId { get; set; }
|
||||
public Guid OrganizationUserId { get; set; }
|
||||
public bool ReadOnly { get; set; }
|
||||
}
|
||||
}
|
@ -8,6 +8,7 @@ namespace Bit.Core.Models.Table
|
||||
public Guid Id { get; set; }
|
||||
public Guid OrganizationId { get; set; }
|
||||
public string Name { get; set; }
|
||||
public bool AccessAll { get; set; }
|
||||
public DateTime CreationDate { get; internal set; } = DateTime.UtcNow;
|
||||
public DateTime RevisionDate { get; internal set; } = DateTime.UtcNow;
|
||||
|
||||
|
Reference in New Issue
Block a user