1
0
mirror of https://github.com/bitwarden/server.git synced 2025-04-05 13:08:17 -05:00
This commit is contained in:
Brandon 2025-03-26 17:26:21 -04:00
parent bd5c97a778
commit c23c5c3e21
No known key found for this signature in database
GPG Key ID: A0E0EF0B207BA40D
7 changed files with 13 additions and 14 deletions

View File

@ -76,7 +76,6 @@ public class OrganizationEditModel : OrganizationViewModel
MaxCollections = org.MaxCollections; MaxCollections = org.MaxCollections;
UsePolicies = org.UsePolicies; UsePolicies = org.UsePolicies;
UseSso = org.UseSso; UseSso = org.UseSso;
UseOrganizationDomains = org.UseOrganizationDomains;
UseKeyConnector = org.UseKeyConnector; UseKeyConnector = org.UseKeyConnector;
UseScim = org.UseScim; UseScim = org.UseScim;
UseGroups = org.UseGroups; UseGroups = org.UseGroups;
@ -102,7 +101,7 @@ public class OrganizationEditModel : OrganizationViewModel
MaxAutoscaleSmSeats = org.MaxAutoscaleSmSeats; MaxAutoscaleSmSeats = org.MaxAutoscaleSmSeats;
SmServiceAccounts = org.SmServiceAccounts; SmServiceAccounts = org.SmServiceAccounts;
MaxAutoscaleSmServiceAccounts = org.MaxAutoscaleSmServiceAccounts; MaxAutoscaleSmServiceAccounts = org.MaxAutoscaleSmServiceAccounts;
UseOrganizationDomains = org.UseOrganizationDomains;
_plans = plans; _plans = plans;
} }
@ -133,8 +132,6 @@ public class OrganizationEditModel : OrganizationViewModel
public bool UsePolicies { get; set; } public bool UsePolicies { get; set; }
[Display(Name = "SSO")] [Display(Name = "SSO")]
public bool UseSso { get; set; } public bool UseSso { get; set; }
[Display(Name = "Use Organization Domains")]
public bool UseOrganizationDomains { get; set; }
[Display(Name = "Key Connector with Customer Encryption")] [Display(Name = "Key Connector with Customer Encryption")]
public bool UseKeyConnector { get; set; } public bool UseKeyConnector { get; set; }
[Display(Name = "Groups")] [Display(Name = "Groups")]
@ -186,6 +183,8 @@ public class OrganizationEditModel : OrganizationViewModel
public int? SmServiceAccounts { get; set; } public int? SmServiceAccounts { get; set; }
[Display(Name = "Max Autoscale Machine Accounts")] [Display(Name = "Max Autoscale Machine Accounts")]
public int? MaxAutoscaleSmServiceAccounts { get; set; } public int? MaxAutoscaleSmServiceAccounts { get; set; }
[Display(Name = "Use Organization Domains")]
public bool UseOrganizationDomains { get; set; }
/** /**
* Creates a Plan[] object for use in Javascript * Creates a Plan[] object for use in Javascript
@ -289,7 +288,6 @@ public class OrganizationEditModel : OrganizationViewModel
existingOrganization.MaxCollections = MaxCollections; existingOrganization.MaxCollections = MaxCollections;
existingOrganization.UsePolicies = UsePolicies; existingOrganization.UsePolicies = UsePolicies;
existingOrganization.UseSso = UseSso; existingOrganization.UseSso = UseSso;
existingOrganization.UseOrganizationDomains = UseOrganizationDomains;
existingOrganization.UseKeyConnector = UseKeyConnector; existingOrganization.UseKeyConnector = UseKeyConnector;
existingOrganization.UseScim = UseScim; existingOrganization.UseScim = UseScim;
existingOrganization.UseGroups = UseGroups; existingOrganization.UseGroups = UseGroups;
@ -316,6 +314,7 @@ public class OrganizationEditModel : OrganizationViewModel
existingOrganization.MaxAutoscaleSmSeats = MaxAutoscaleSmSeats; existingOrganization.MaxAutoscaleSmSeats = MaxAutoscaleSmSeats;
existingOrganization.SmServiceAccounts = SmServiceAccounts; existingOrganization.SmServiceAccounts = SmServiceAccounts;
existingOrganization.MaxAutoscaleSmServiceAccounts = MaxAutoscaleSmServiceAccounts; existingOrganization.MaxAutoscaleSmServiceAccounts = MaxAutoscaleSmServiceAccounts;
existingOrganization.UseOrganizationDomains = UseOrganizationDomains;
return existingOrganization; return existingOrganization;
} }
} }

View File

@ -40,7 +40,6 @@ public class OrganizationResponseModel : ResponseModel
MaxStorageGb = organization.MaxStorageGb; MaxStorageGb = organization.MaxStorageGb;
UsePolicies = organization.UsePolicies; UsePolicies = organization.UsePolicies;
UseSso = organization.UseSso; UseSso = organization.UseSso;
UseOrganizationDomains = organization.UseOrganizationDomains;
UseKeyConnector = organization.UseKeyConnector; UseKeyConnector = organization.UseKeyConnector;
UseScim = organization.UseScim; UseScim = organization.UseScim;
UseGroups = organization.UseGroups; UseGroups = organization.UseGroups;
@ -65,6 +64,7 @@ public class OrganizationResponseModel : ResponseModel
LimitItemDeletion = organization.LimitItemDeletion; LimitItemDeletion = organization.LimitItemDeletion;
AllowAdminAccessToAllCollectionItems = organization.AllowAdminAccessToAllCollectionItems; AllowAdminAccessToAllCollectionItems = organization.AllowAdminAccessToAllCollectionItems;
UseRiskInsights = organization.UseRiskInsights; UseRiskInsights = organization.UseRiskInsights;
UseOrganizationDomains = organization.UseOrganizationDomains;
} }
public Guid Id { get; set; } public Guid Id { get; set; }
@ -87,7 +87,6 @@ public class OrganizationResponseModel : ResponseModel
public short? MaxStorageGb { get; set; } public short? MaxStorageGb { get; set; }
public bool UsePolicies { get; set; } public bool UsePolicies { get; set; }
public bool UseSso { get; set; } public bool UseSso { get; set; }
public bool UseOrganizationDomains { get; set; }
public bool UseKeyConnector { get; set; } public bool UseKeyConnector { get; set; }
public bool UseScim { get; set; } public bool UseScim { get; set; }
public bool UseGroups { get; set; } public bool UseGroups { get; set; }
@ -112,6 +111,7 @@ public class OrganizationResponseModel : ResponseModel
public bool LimitItemDeletion { get; set; } public bool LimitItemDeletion { get; set; }
public bool AllowAdminAccessToAllCollectionItems { get; set; } public bool AllowAdminAccessToAllCollectionItems { get; set; }
public bool UseRiskInsights { get; set; } public bool UseRiskInsights { get; set; }
public bool UseOrganizationDomains { get; set; }
} }
public class OrganizationSubscriptionResponseModel : OrganizationResponseModel public class OrganizationSubscriptionResponseModel : OrganizationResponseModel

View File

@ -25,7 +25,6 @@ public class ProfileOrganizationResponseModel : ResponseModel
Name = organization.Name; Name = organization.Name;
UsePolicies = organization.UsePolicies; UsePolicies = organization.UsePolicies;
UseSso = organization.UseSso; UseSso = organization.UseSso;
UseOrganizationDomains = organization.UseOrganizationDomains;
UseKeyConnector = organization.UseKeyConnector; UseKeyConnector = organization.UseKeyConnector;
UseScim = organization.UseScim; UseScim = organization.UseScim;
UseGroups = organization.UseGroups; UseGroups = organization.UseGroups;
@ -73,6 +72,7 @@ public class ProfileOrganizationResponseModel : ResponseModel
AllowAdminAccessToAllCollectionItems = organization.AllowAdminAccessToAllCollectionItems; AllowAdminAccessToAllCollectionItems = organization.AllowAdminAccessToAllCollectionItems;
UserIsManagedByOrganization = organizationIdsManagingUser.Contains(organization.OrganizationId); UserIsManagedByOrganization = organizationIdsManagingUser.Contains(organization.OrganizationId);
UseRiskInsights = organization.UseRiskInsights; UseRiskInsights = organization.UseRiskInsights;
UseOrganizationDomains = organization.UseOrganizationDomains;
if (organization.SsoConfig != null) if (organization.SsoConfig != null)
{ {
@ -87,7 +87,6 @@ public class ProfileOrganizationResponseModel : ResponseModel
public string Name { get; set; } public string Name { get; set; }
public bool UsePolicies { get; set; } public bool UsePolicies { get; set; }
public bool UseSso { get; set; } public bool UseSso { get; set; }
public bool UseOrganizationDomains { get; set; }
public bool UseKeyConnector { get; set; } public bool UseKeyConnector { get; set; }
public bool UseScim { get; set; } public bool UseScim { get; set; }
public bool UseGroups { get; set; } public bool UseGroups { get; set; }
@ -146,4 +145,5 @@ public class ProfileOrganizationResponseModel : ResponseModel
/// </returns> /// </returns>
public bool UserIsManagedByOrganization { get; set; } public bool UserIsManagedByOrganization { get; set; }
public bool UseRiskInsights { get; set; } public bool UseRiskInsights { get; set; }
public bool UseOrganizationDomains { get; set; }
} }

View File

@ -15,7 +15,6 @@ public class ProfileProviderOrganizationResponseModel : ProfileOrganizationRespo
Name = organization.Name; Name = organization.Name;
UsePolicies = organization.UsePolicies; UsePolicies = organization.UsePolicies;
UseSso = organization.UseSso; UseSso = organization.UseSso;
UseOrganizationDomains = organization.UseOrganizationDomains;
UseKeyConnector = organization.UseKeyConnector; UseKeyConnector = organization.UseKeyConnector;
UseScim = organization.UseScim; UseScim = organization.UseScim;
UseGroups = organization.UseGroups; UseGroups = organization.UseGroups;
@ -51,5 +50,6 @@ public class ProfileProviderOrganizationResponseModel : ProfileOrganizationRespo
LimitItemDeletion = organization.LimitItemDeletion; LimitItemDeletion = organization.LimitItemDeletion;
AllowAdminAccessToAllCollectionItems = organization.AllowAdminAccessToAllCollectionItems; AllowAdminAccessToAllCollectionItems = organization.AllowAdminAccessToAllCollectionItems;
UseRiskInsights = organization.UseRiskInsights; UseRiskInsights = organization.UseRiskInsights;
UseOrganizationDomains = organization.UseOrganizationDomains;
} }
} }

View File

@ -51,7 +51,6 @@ public class Organization : ITableObject<Guid>, IStorableSubscriber, IRevisable,
public short? MaxCollections { get; set; } public short? MaxCollections { get; set; }
public bool UsePolicies { get; set; } public bool UsePolicies { get; set; }
public bool UseSso { get; set; } public bool UseSso { get; set; }
public bool UseOrganizationDomains { get; set; }
public bool UseKeyConnector { get; set; } public bool UseKeyConnector { get; set; }
public bool UseScim { get; set; } public bool UseScim { get; set; }
public bool UseGroups { get; set; } public bool UseGroups { get; set; }
@ -114,6 +113,7 @@ public class Organization : ITableObject<Guid>, IStorableSubscriber, IRevisable,
/// Risk Insights is a reporting feature that provides insights into the security of an organization's vault. /// Risk Insights is a reporting feature that provides insights into the security of an organization's vault.
/// </summary> /// </summary>
public bool UseRiskInsights { get; set; } public bool UseRiskInsights { get; set; }
public bool UseOrganizationDomains { get; set; }
public void SetNewId() public void SetNewId()
{ {

View File

@ -14,7 +14,6 @@ public class OrganizationUserOrganizationDetails
public string Name { get; set; } public string Name { get; set; }
public bool UsePolicies { get; set; } public bool UsePolicies { get; set; }
public bool UseSso { get; set; } public bool UseSso { get; set; }
public bool UseOrganizationDomains { get; set; }
public bool UseKeyConnector { get; set; } public bool UseKeyConnector { get; set; }
public bool UseScim { get; set; } public bool UseScim { get; set; }
public bool UseGroups { get; set; } public bool UseGroups { get; set; }
@ -60,4 +59,5 @@ public class OrganizationUserOrganizationDetails
public bool LimitItemDeletion { get; set; } public bool LimitItemDeletion { get; set; }
public bool AllowAdminAccessToAllCollectionItems { get; set; } public bool AllowAdminAccessToAllCollectionItems { get; set; }
public bool UseRiskInsights { get; set; } public bool UseRiskInsights { get; set; }
public bool UseOrganizationDomains { get; set; }
} }

View File

@ -82,7 +82,6 @@ public class CloudOrganizationSignUpCommand(
(short?)null : (short)(plan.PasswordManager.BaseStorageGb.Value + signup.AdditionalStorageGb), (short?)null : (short)(plan.PasswordManager.BaseStorageGb.Value + signup.AdditionalStorageGb),
UsePolicies = plan.HasPolicies, UsePolicies = plan.HasPolicies,
UseSso = plan.HasSso, UseSso = plan.HasSso,
UseOrganizationDomains = plan.HasOrganizationDomains,
UseGroups = plan.HasGroups, UseGroups = plan.HasGroups,
UseEvents = plan.HasEvents, UseEvents = plan.HasEvents,
UseDirectory = plan.HasDirectory, UseDirectory = plan.HasDirectory,
@ -105,7 +104,8 @@ public class CloudOrganizationSignUpCommand(
RevisionDate = DateTime.UtcNow, RevisionDate = DateTime.UtcNow,
Status = OrganizationStatusType.Created, Status = OrganizationStatusType.Created,
UsePasswordManager = true, UsePasswordManager = true,
UseSecretsManager = signup.UseSecretsManager UseSecretsManager = signup.UseSecretsManager,
UseOrganizationDomains = plan.HasOrganizationDomains,
}; };
if (signup.UseSecretsManager) if (signup.UseSecretsManager)