1
0
mirror of https://github.com/bitwarden/server.git synced 2025-06-30 15:42:48 -05:00

apis for managing collection users

This commit is contained in:
Kyle Spearrin
2018-10-17 22:18:03 -04:00
parent 7db36e0005
commit 33bfd12b7d
11 changed files with 81 additions and 121 deletions

View File

@ -1,34 +0,0 @@
using System;
using Bit.Core.Models.Data;
using Bit.Core.Enums;
namespace Bit.Core.Models.Api
{
public class CollectionUserResponseModel : ResponseModel
{
public CollectionUserResponseModel(CollectionUserDetails collectionUser)
: base("collectionUser")
{
if(collectionUser == null)
{
throw new ArgumentNullException(nameof(collectionUser));
}
OrganizationUserId = collectionUser.OrganizationUserId.ToString();
AccessAll = collectionUser.AccessAll;
Name = collectionUser.Name;
Email = collectionUser.Email;
Type = collectionUser.Type;
Status = collectionUser.Status;
ReadOnly = collectionUser.ReadOnly;
}
public string OrganizationUserId { get; set; }
public bool AccessAll { get; set; }
public string Name { get; set; }
public string Email { get; set; }
public OrganizationUserType Type { get; set; }
public OrganizationUserStatusType Status { get; set; }
public bool ReadOnly { get; set; }
}
}

View File

@ -3,9 +3,10 @@ using Bit.Core.Models.Data;
namespace Bit.Core.Models.Api
{
public class SelectionReadOnlyResponseModel
public class SelectionReadOnlyResponseModel : ResponseModel
{
public SelectionReadOnlyResponseModel(SelectionReadOnly selection)
: base("selection")
{
if(selection == null)
{

View File

@ -1,15 +0,0 @@
using System;
namespace Bit.Core.Models.Data
{
public class CollectionUserDetails
{
public Guid OrganizationUserId { get; set; }
public bool AccessAll { get; set; }
public string Name { get; set; }
public string Email { get; set; }
public Enums.OrganizationUserStatusType Status { get; set; }
public Enums.OrganizationUserType Type { get; set; }
public bool ReadOnly { get; set; }
}
}