From 5b7c683c5731764731451da9d0a7a5aa201c7ff0 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Sat, 25 Mar 2017 16:34:30 -0400 Subject: [PATCH] Added user type to organization APIs --- .../Models/Api/Response/ProfileOrganizationResponseModel.cs | 2 ++ src/Core/Models/Data/OrganizationUserOrganizationDetails.cs | 1 + src/Sql/dbo/Views/OrganizationUserOrganizationDetailsView.sql | 3 ++- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Core/Models/Api/Response/ProfileOrganizationResponseModel.cs b/src/Core/Models/Api/Response/ProfileOrganizationResponseModel.cs index 9eba8bf9a..5f3112b8d 100644 --- a/src/Core/Models/Api/Response/ProfileOrganizationResponseModel.cs +++ b/src/Core/Models/Api/Response/ProfileOrganizationResponseModel.cs @@ -12,11 +12,13 @@ namespace Bit.Core.Models.Api Name = organization.Name; Key = organization.Key; Status = organization.Status; + Type = organization; } public string Id { get; set; } public string Name { get; set; } public string Key { get; set; } public OrganizationUserStatusType Status { get; set; } + public OrganizationUserType Type { get; set; } } } diff --git a/src/Core/Models/Data/OrganizationUserOrganizationDetails.cs b/src/Core/Models/Data/OrganizationUserOrganizationDetails.cs index 71026adac..41f7c09e8 100644 --- a/src/Core/Models/Data/OrganizationUserOrganizationDetails.cs +++ b/src/Core/Models/Data/OrganizationUserOrganizationDetails.cs @@ -9,5 +9,6 @@ namespace Bit.Core.Models.Data public string Name { get; set; } public string Key { get; set; } public Enums.OrganizationUserStatusType Status { get; set; } + public Enums.OrganizationUserType Type { get; set; } } } diff --git a/src/Sql/dbo/Views/OrganizationUserOrganizationDetailsView.sql b/src/Sql/dbo/Views/OrganizationUserOrganizationDetailsView.sql index a49cfff58..5613cff75 100644 --- a/src/Sql/dbo/Views/OrganizationUserOrganizationDetailsView.sql +++ b/src/Sql/dbo/Views/OrganizationUserOrganizationDetailsView.sql @@ -5,7 +5,8 @@ SELECT OU.[OrganizationId], O.[Name], OU.[Key], - OU.[Status] + OU.[Status], + OU.[Type] FROM [dbo].[OrganizationUser] OU INNER JOIN