From 151eae2f05e1ff13f799fbc2c84e763266cd7349 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Thu, 8 Jun 2017 09:46:00 -0400 Subject: [PATCH] return org props for groups. error on del password --- src/Api/Controllers/OrganizationsController.cs | 2 +- src/Core/Models/Api/Response/OrganizationResponseModel.cs | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Api/Controllers/OrganizationsController.cs b/src/Api/Controllers/OrganizationsController.cs index 72f849c311..abb5fe8555 100644 --- a/src/Api/Controllers/OrganizationsController.cs +++ b/src/Api/Controllers/OrganizationsController.cs @@ -230,8 +230,8 @@ namespace Bit.Api.Controllers if(!await _userManager.CheckPasswordAsync(user, model.MasterPasswordHash)) { - ModelState.AddModelError("MasterPasswordHash", "Invalid password."); await Task.Delay(2000); + throw new BadRequestException("MasterPasswordHash", "Invalid password."); } else { diff --git a/src/Core/Models/Api/Response/OrganizationResponseModel.cs b/src/Core/Models/Api/Response/OrganizationResponseModel.cs index 57bd575801..a6a8d9e8c9 100644 --- a/src/Core/Models/Api/Response/OrganizationResponseModel.cs +++ b/src/Core/Models/Api/Response/OrganizationResponseModel.cs @@ -24,6 +24,9 @@ namespace Bit.Core.Models.Api Plan = organization.Plan; PlanType = organization.PlanType; Seats = organization.Seats; + MaxCollections = organization.MaxCollections; + UseGroups = organization.UseGroups; + UseDirectory = organization.UseDirectory; } public string Id { get; set; } @@ -33,6 +36,9 @@ namespace Bit.Core.Models.Api public string Plan { get; set; } public Enums.PlanType PlanType { get; set; } public short? Seats { get; set; } + public short? MaxCollections { get; set; } + public bool UseGroups { get; set; } + public bool UseDirectory { get; set; } } public class OrganizationBillingResponseModel : OrganizationResponseModel