2023-10-27 03:38:29 +10:00
|
|
|
|
using Bit.Core.AdminConsole.Models.Data.Provider;
|
2024-06-14 15:34:47 -04:00
|
|
|
|
using Bit.Core.Billing.Enums;
|
2023-10-27 03:38:29 +10:00
|
|
|
|
using Bit.Core.Enums;
|
2021-07-08 17:05:32 +02:00
|
|
|
|
using Bit.Core.Models.Data;
|
2023-01-26 11:51:26 -05:00
|
|
|
|
using Bit.Core.Utilities;
|
2021-07-08 17:05:32 +02:00
|
|
|
|
|
2023-10-19 01:27:56 +10:00
|
|
|
|
namespace Bit.Api.AdminConsole.Models.Response;
|
2022-08-29 16:06:55 -04:00
|
|
|
|
|
2021-07-15 16:37:27 +02:00
|
|
|
|
public class ProfileProviderOrganizationResponseModel : ProfileOrganizationResponseModel
|
2021-07-08 17:05:32 +02:00
|
|
|
|
{
|
2021-07-15 16:37:27 +02:00
|
|
|
|
public ProfileProviderOrganizationResponseModel(ProviderUserOrganizationDetails organization)
|
|
|
|
|
|
: base("profileProviderOrganization")
|
2021-07-08 17:05:32 +02:00
|
|
|
|
{
|
2023-07-14 17:18:26 +02:00
|
|
|
|
Id = organization.OrganizationId;
|
2021-07-08 17:05:32 +02:00
|
|
|
|
Name = organization.Name;
|
|
|
|
|
|
UsePolicies = organization.UsePolicies;
|
|
|
|
|
|
UseSso = organization.UseSso;
|
2021-11-17 11:46:35 +01:00
|
|
|
|
UseKeyConnector = organization.UseKeyConnector;
|
2022-07-14 15:58:48 -04:00
|
|
|
|
UseScim = organization.UseScim;
|
2021-07-08 17:05:32 +02:00
|
|
|
|
UseGroups = organization.UseGroups;
|
|
|
|
|
|
UseDirectory = organization.UseDirectory;
|
|
|
|
|
|
UseEvents = organization.UseEvents;
|
|
|
|
|
|
UseTotp = organization.UseTotp;
|
|
|
|
|
|
Use2fa = organization.Use2fa;
|
|
|
|
|
|
UseApi = organization.UseApi;
|
|
|
|
|
|
UseResetPassword = organization.UseResetPassword;
|
|
|
|
|
|
UsersGetPremium = organization.UsersGetPremium;
|
2022-12-06 09:50:08 +00:00
|
|
|
|
UseCustomPermissions = organization.UseCustomPermissions;
|
2024-06-14 15:34:47 -04:00
|
|
|
|
UseActivateAutofillPolicy = StaticStore.GetPlan(organization.PlanType).ProductTier == ProductTierType.Enterprise;
|
2021-07-08 17:05:32 +02:00
|
|
|
|
SelfHost = organization.SelfHost;
|
|
|
|
|
|
Seats = organization.Seats;
|
|
|
|
|
|
MaxCollections = organization.MaxCollections;
|
|
|
|
|
|
MaxStorageGb = organization.MaxStorageGb;
|
|
|
|
|
|
Key = organization.Key;
|
|
|
|
|
|
HasPublicAndPrivateKeys = organization.PublicKey != null && organization.PrivateKey != null;
|
2021-07-15 16:37:27 +02:00
|
|
|
|
Status = OrganizationUserStatusType.Confirmed; // Provider users are always confirmed
|
|
|
|
|
|
Type = OrganizationUserType.Owner; // Provider users behave like Owners
|
2021-07-08 17:05:32 +02:00
|
|
|
|
Enabled = organization.Enabled;
|
2021-07-15 16:37:27 +02:00
|
|
|
|
SsoBound = false;
|
2021-07-08 17:05:32 +02:00
|
|
|
|
Identifier = organization.Identifier;
|
2021-07-15 16:37:27 +02:00
|
|
|
|
Permissions = new Permissions();
|
|
|
|
|
|
ResetPasswordEnrolled = false;
|
2023-07-14 17:18:26 +02:00
|
|
|
|
UserId = organization.UserId;
|
|
|
|
|
|
ProviderId = organization.ProviderId;
|
2021-07-08 17:05:32 +02:00
|
|
|
|
ProviderName = organization.ProviderName;
|
2025-01-06 10:34:52 -06:00
|
|
|
|
ProviderType = organization.ProviderType;
|
2024-06-14 15:34:47 -04:00
|
|
|
|
ProductTierType = StaticStore.GetPlan(organization.PlanType).ProductTier;
|
2024-10-18 11:00:01 -04:00
|
|
|
|
LimitCollectionCreation = organization.LimitCollectionCreation;
|
|
|
|
|
|
LimitCollectionDeletion = organization.LimitCollectionDeletion;
|
2025-01-28 12:58:04 -05:00
|
|
|
|
LimitItemDeletion = organization.LimitItemDeletion;
|
2024-01-29 20:04:45 +00:00
|
|
|
|
AllowAdminAccessToAllCollectionItems = organization.AllowAdminAccessToAllCollectionItems;
|
2024-12-05 10:46:01 -06:00
|
|
|
|
UseRiskInsights = organization.UseRiskInsights;
|
2021-07-08 17:05:32 +02:00
|
|
|
|
}
|
|
|
|
|
|
}
|