mirror of
https://github.com/bitwarden/server
synced 2025-12-27 05:33:17 +00:00
* Adding AutoConfrim and migrations. * Add value to Admin Page and update sproc to correct name. * Correcting license constant. * Adding feature check back in. * Fixing sprocs :face_palm: * Remove Coalesce * Adding property to plan and model constructor * Correcting name of column. Cascading change throughout. Updating response models. Updating sprocs and views. Updating migrations * fixing sproc * Fixing up license stuff. * Updating org view * Code review changes and renames :face_palm: * Refershing additional views * Last two fixes.
58 lines
2.7 KiB
C#
58 lines
2.7 KiB
C#
using Bit.Core.AdminConsole.Models.Data.Provider;
|
|
using Bit.Core.Billing.Enums;
|
|
using Bit.Core.Billing.Extensions;
|
|
using Bit.Core.Enums;
|
|
using Bit.Core.Models.Data;
|
|
|
|
namespace Bit.Api.AdminConsole.Models.Response;
|
|
|
|
public class ProfileProviderOrganizationResponseModel : ProfileOrganizationResponseModel
|
|
{
|
|
public ProfileProviderOrganizationResponseModel(ProviderUserOrganizationDetails organization)
|
|
: base("profileProviderOrganization")
|
|
{
|
|
Id = organization.OrganizationId;
|
|
Name = organization.Name;
|
|
UsePolicies = organization.UsePolicies;
|
|
UseSso = organization.UseSso;
|
|
UseKeyConnector = organization.UseKeyConnector;
|
|
UseScim = organization.UseScim;
|
|
UseGroups = organization.UseGroups;
|
|
UseDirectory = organization.UseDirectory;
|
|
UseEvents = organization.UseEvents;
|
|
UseTotp = organization.UseTotp;
|
|
Use2fa = organization.Use2fa;
|
|
UseApi = organization.UseApi;
|
|
UseResetPassword = organization.UseResetPassword;
|
|
UsersGetPremium = organization.UsersGetPremium;
|
|
UseCustomPermissions = organization.UseCustomPermissions;
|
|
UseActivateAutofillPolicy = organization.PlanType.GetProductTier() == ProductTierType.Enterprise;
|
|
SelfHost = organization.SelfHost;
|
|
Seats = organization.Seats;
|
|
MaxCollections = organization.MaxCollections;
|
|
MaxStorageGb = organization.MaxStorageGb;
|
|
Key = organization.Key;
|
|
HasPublicAndPrivateKeys = organization.PublicKey != null && organization.PrivateKey != null;
|
|
Status = OrganizationUserStatusType.Confirmed; // Provider users are always confirmed
|
|
Type = OrganizationUserType.Owner; // Provider users behave like Owners
|
|
Enabled = organization.Enabled;
|
|
SsoBound = false;
|
|
Identifier = organization.Identifier;
|
|
Permissions = new Permissions();
|
|
ResetPasswordEnrolled = false;
|
|
UserId = organization.UserId;
|
|
ProviderId = organization.ProviderId;
|
|
ProviderName = organization.ProviderName;
|
|
ProviderType = organization.ProviderType;
|
|
ProductTierType = organization.PlanType.GetProductTier();
|
|
LimitCollectionCreation = organization.LimitCollectionCreation;
|
|
LimitCollectionDeletion = organization.LimitCollectionDeletion;
|
|
LimitItemDeletion = organization.LimitItemDeletion;
|
|
AllowAdminAccessToAllCollectionItems = organization.AllowAdminAccessToAllCollectionItems;
|
|
UseRiskInsights = organization.UseRiskInsights;
|
|
UseOrganizationDomains = organization.UseOrganizationDomains;
|
|
UseAdminSponsoredFamilies = organization.UseAdminSponsoredFamilies;
|
|
UseAutomaticUserConfirmation = organization.UseAutomaticUserConfirmation;
|
|
}
|
|
}
|