mirror of
https://github.com/bitwarden/server.git
synced 2025-07-01 08:02:49 -05:00
collection groups management
This commit is contained in:
@ -13,7 +13,7 @@ namespace Bit.Core.Models.Api
|
||||
[EncryptedString]
|
||||
[StringLength(300)]
|
||||
public string Name { get; set; }
|
||||
public IEnumerable<string> GroupIds { get; set; }
|
||||
public IEnumerable<SelectionReadOnlyRequestModel> Groups { get; set; }
|
||||
|
||||
public Collection ToCollection(Guid orgId)
|
||||
{
|
||||
|
@ -1,6 +1,8 @@
|
||||
using System;
|
||||
using Bit.Core.Models.Table;
|
||||
using System.Collections.Generic;
|
||||
using Bit.Core.Models.Data;
|
||||
using System.Linq;
|
||||
|
||||
namespace Bit.Core.Models.Api
|
||||
{
|
||||
@ -26,12 +28,12 @@ namespace Bit.Core.Models.Api
|
||||
|
||||
public class CollectionDetailsResponseModel : CollectionResponseModel
|
||||
{
|
||||
public CollectionDetailsResponseModel(Collection collection, IEnumerable<Guid> groupIds)
|
||||
public CollectionDetailsResponseModel(Collection collection, IEnumerable<SelectionReadOnly> groups)
|
||||
: base(collection, "collectionDetails")
|
||||
{
|
||||
GroupIds = groupIds;
|
||||
Groups = groups.Select(g => new SelectionReadOnlyResponseModel(g));
|
||||
}
|
||||
|
||||
public IEnumerable<Guid> GroupIds { get; set; }
|
||||
public IEnumerable<SelectionReadOnlyResponseModel> Groups { get; set; }
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user