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

add/edit group with collection ids

This commit is contained in:
Kyle Spearrin
2017-05-08 22:14:01 -04:00
parent e996a410dc
commit d166f9cca3
9 changed files with 191 additions and 2 deletions

View File

@ -2,6 +2,7 @@
using System.ComponentModel.DataAnnotations;
using Bit.Core.Models.Table;
using Newtonsoft.Json;
using System.Collections.Generic;
namespace Bit.Core.Models.Api
{
@ -10,6 +11,7 @@ namespace Bit.Core.Models.Api
[Required]
[StringLength(300)]
public string Name { get; set; }
public IEnumerable<string> CollectionIds { get; set; }
public Group ToGroup(Guid orgId)
{

View File

@ -1,5 +1,6 @@
using System;
using Bit.Core.Models.Table;
using System.Collections.Generic;
namespace Bit.Core.Models.Api
{
@ -22,4 +23,15 @@ namespace Bit.Core.Models.Api
public string OrganizationId { get; set; }
public string Name { get; set; }
}
public class GroupDetailsResponseModel : GroupResponseModel
{
public GroupDetailsResponseModel(Group group, IEnumerable<Guid> collectionIds)
: base(group, "groupDetails")
{
CollectionIds = collectionIds;
}
public IEnumerable<Guid> CollectionIds { get; set; }
}
}