1
0
mirror of https://github.com/bitwarden/server synced 2025-12-20 02:03:46 +00:00

collection user refactor

This commit is contained in:
Kyle Spearrin
2017-05-11 14:52:35 -04:00
parent d7f9977382
commit 21d1cd6adc
43 changed files with 318 additions and 504 deletions

View File

@@ -1,5 +1,4 @@
using System;
using Bit.Core.Models.Table;
using Bit.Core.Models.Data;
using Bit.Core.Enums;
@@ -7,7 +6,7 @@ namespace Bit.Core.Models.Api
{
public class CollectionUserResponseModel : ResponseModel
{
public CollectionUserResponseModel(CollectionUserUserDetails collectionUser)
public CollectionUserResponseModel(CollectionUserDetails collectionUser)
: base("collectionUser")
{
if(collectionUser == null)
@@ -15,9 +14,7 @@ namespace Bit.Core.Models.Api
throw new ArgumentNullException(nameof(collectionUser));
}
Id = collectionUser.Id?.ToString();
OrganizationUserId = collectionUser.OrganizationUserId.ToString();
CollectionId = collectionUser.CollectionId?.ToString();
AccessAll = collectionUser.AccessAll;
Name = collectionUser.Name;
Email = collectionUser.Email;
@@ -26,9 +23,7 @@ namespace Bit.Core.Models.Api
ReadOnly = collectionUser.ReadOnly;
}
public string Id { get; set; }
public string OrganizationUserId { get; set; }
public string CollectionId { get; set; }
public bool AccessAll { get; set; }
public string Name { get; set; }
public string Email { get; set; }