mirror of
https://github.com/bitwarden/server
synced 2025-12-06 00:03:34 +00:00
[PM-28616] Add flag UsePhishingBlocker to dbo.Organization (#6625)
* PM-28616 Add flag UsePhishingBlocker to dbo.Organization * PM-28616 updated as per comments from claude * PM-28616 updated ToLicense Method to copy the license file * PM-28616 allow phishing blocker to be imported via license files for self-hosted * PM-28616 updated PR comments - added more views to be refreshed * PM-28616 removed proeprty from constructor as it is not used anymore. We have moved to claims based properties
This commit is contained in:
@@ -473,6 +473,7 @@ public class OrganizationsController : Controller
|
|||||||
organization.UseOrganizationDomains = model.UseOrganizationDomains;
|
organization.UseOrganizationDomains = model.UseOrganizationDomains;
|
||||||
organization.UseAdminSponsoredFamilies = model.UseAdminSponsoredFamilies;
|
organization.UseAdminSponsoredFamilies = model.UseAdminSponsoredFamilies;
|
||||||
organization.UseAutomaticUserConfirmation = model.UseAutomaticUserConfirmation;
|
organization.UseAutomaticUserConfirmation = model.UseAutomaticUserConfirmation;
|
||||||
|
organization.UsePhishingBlocker = model.UsePhishingBlocker;
|
||||||
|
|
||||||
//secrets
|
//secrets
|
||||||
organization.SmSeats = model.SmSeats;
|
organization.SmSeats = model.SmSeats;
|
||||||
|
|||||||
@@ -107,6 +107,7 @@ public class OrganizationEditModel : OrganizationViewModel
|
|||||||
MaxAutoscaleSmServiceAccounts = org.MaxAutoscaleSmServiceAccounts;
|
MaxAutoscaleSmServiceAccounts = org.MaxAutoscaleSmServiceAccounts;
|
||||||
UseOrganizationDomains = org.UseOrganizationDomains;
|
UseOrganizationDomains = org.UseOrganizationDomains;
|
||||||
UseAutomaticUserConfirmation = org.UseAutomaticUserConfirmation;
|
UseAutomaticUserConfirmation = org.UseAutomaticUserConfirmation;
|
||||||
|
UsePhishingBlocker = org.UsePhishingBlocker;
|
||||||
|
|
||||||
_plans = plans;
|
_plans = plans;
|
||||||
}
|
}
|
||||||
@@ -160,6 +161,8 @@ public class OrganizationEditModel : OrganizationViewModel
|
|||||||
public new bool UseSecretsManager { get; set; }
|
public new bool UseSecretsManager { get; set; }
|
||||||
[Display(Name = "Risk Insights")]
|
[Display(Name = "Risk Insights")]
|
||||||
public new bool UseRiskInsights { get; set; }
|
public new bool UseRiskInsights { get; set; }
|
||||||
|
[Display(Name = "Phishing Blocker")]
|
||||||
|
public new bool UsePhishingBlocker { get; set; }
|
||||||
[Display(Name = "Admin Sponsored Families")]
|
[Display(Name = "Admin Sponsored Families")]
|
||||||
public bool UseAdminSponsoredFamilies { get; set; }
|
public bool UseAdminSponsoredFamilies { get; set; }
|
||||||
[Display(Name = "Self Host")]
|
[Display(Name = "Self Host")]
|
||||||
@@ -327,6 +330,7 @@ public class OrganizationEditModel : OrganizationViewModel
|
|||||||
existingOrganization.SmServiceAccounts = SmServiceAccounts;
|
existingOrganization.SmServiceAccounts = SmServiceAccounts;
|
||||||
existingOrganization.MaxAutoscaleSmServiceAccounts = MaxAutoscaleSmServiceAccounts;
|
existingOrganization.MaxAutoscaleSmServiceAccounts = MaxAutoscaleSmServiceAccounts;
|
||||||
existingOrganization.UseOrganizationDomains = UseOrganizationDomains;
|
existingOrganization.UseOrganizationDomains = UseOrganizationDomains;
|
||||||
|
existingOrganization.UsePhishingBlocker = UsePhishingBlocker;
|
||||||
return existingOrganization;
|
return existingOrganization;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -75,6 +75,7 @@ public class OrganizationViewModel
|
|||||||
public int OccupiedSmSeatsCount { get; set; }
|
public int OccupiedSmSeatsCount { get; set; }
|
||||||
public bool UseSecretsManager => Organization.UseSecretsManager;
|
public bool UseSecretsManager => Organization.UseSecretsManager;
|
||||||
public bool UseRiskInsights => Organization.UseRiskInsights;
|
public bool UseRiskInsights => Organization.UseRiskInsights;
|
||||||
|
public bool UsePhishingBlocker => Organization.UsePhishingBlocker;
|
||||||
public IEnumerable<OrganizationUserUserDetails> OwnersDetails { get; set; }
|
public IEnumerable<OrganizationUserUserDetails> OwnersDetails { get; set; }
|
||||||
public IEnumerable<OrganizationUserUserDetails> AdminsDetails { get; set; }
|
public IEnumerable<OrganizationUserUserDetails> AdminsDetails { get; set; }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -156,6 +156,10 @@
|
|||||||
<input type="checkbox" class="form-check-input" asp-for="UseAdminSponsoredFamilies" disabled='@(canEditPlan ? null : "disabled")'>
|
<input type="checkbox" class="form-check-input" asp-for="UseAdminSponsoredFamilies" disabled='@(canEditPlan ? null : "disabled")'>
|
||||||
<label class="form-check-label" asp-for="UseAdminSponsoredFamilies"></label>
|
<label class="form-check-label" asp-for="UseAdminSponsoredFamilies"></label>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-check">
|
||||||
|
<input type="checkbox" class="form-check-input" asp-for="UsePhishingBlocker" disabled='@(canEditPlan ? null : "disabled")'>
|
||||||
|
<label class="form-check-label" asp-for="UsePhishingBlocker"></label>
|
||||||
|
</div>
|
||||||
@if(FeatureService.IsEnabled(FeatureFlagKeys.AutomaticConfirmUsers))
|
@if(FeatureService.IsEnabled(FeatureFlagKeys.AutomaticConfirmUsers))
|
||||||
{
|
{
|
||||||
<div class="form-check">
|
<div class="form-check">
|
||||||
|
|||||||
@@ -47,6 +47,7 @@ public abstract class BaseProfileOrganizationResponseModel : ResponseModel
|
|||||||
UseAdminSponsoredFamilies = organizationDetails.UseAdminSponsoredFamilies;
|
UseAdminSponsoredFamilies = organizationDetails.UseAdminSponsoredFamilies;
|
||||||
UseAutomaticUserConfirmation = organizationDetails.UseAutomaticUserConfirmation;
|
UseAutomaticUserConfirmation = organizationDetails.UseAutomaticUserConfirmation;
|
||||||
UseSecretsManager = organizationDetails.UseSecretsManager;
|
UseSecretsManager = organizationDetails.UseSecretsManager;
|
||||||
|
UsePhishingBlocker = organizationDetails.UsePhishingBlocker;
|
||||||
UsePasswordManager = organizationDetails.UsePasswordManager;
|
UsePasswordManager = organizationDetails.UsePasswordManager;
|
||||||
SelfHost = organizationDetails.SelfHost;
|
SelfHost = organizationDetails.SelfHost;
|
||||||
Seats = organizationDetails.Seats;
|
Seats = organizationDetails.Seats;
|
||||||
@@ -99,6 +100,7 @@ public abstract class BaseProfileOrganizationResponseModel : ResponseModel
|
|||||||
public bool UseOrganizationDomains { get; set; }
|
public bool UseOrganizationDomains { get; set; }
|
||||||
public bool UseAdminSponsoredFamilies { get; set; }
|
public bool UseAdminSponsoredFamilies { get; set; }
|
||||||
public bool UseAutomaticUserConfirmation { get; set; }
|
public bool UseAutomaticUserConfirmation { get; set; }
|
||||||
|
public bool UsePhishingBlocker { get; set; }
|
||||||
public bool SelfHost { get; set; }
|
public bool SelfHost { get; set; }
|
||||||
public int? Seats { get; set; }
|
public int? Seats { get; set; }
|
||||||
public short? MaxCollections { get; set; }
|
public short? MaxCollections { get; set; }
|
||||||
|
|||||||
@@ -71,6 +71,7 @@ public class OrganizationResponseModel : ResponseModel
|
|||||||
UseOrganizationDomains = organization.UseOrganizationDomains;
|
UseOrganizationDomains = organization.UseOrganizationDomains;
|
||||||
UseAdminSponsoredFamilies = organization.UseAdminSponsoredFamilies;
|
UseAdminSponsoredFamilies = organization.UseAdminSponsoredFamilies;
|
||||||
UseAutomaticUserConfirmation = organization.UseAutomaticUserConfirmation;
|
UseAutomaticUserConfirmation = organization.UseAutomaticUserConfirmation;
|
||||||
|
UsePhishingBlocker = organization.UsePhishingBlocker;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Guid Id { get; set; }
|
public Guid Id { get; set; }
|
||||||
@@ -120,6 +121,7 @@ public class OrganizationResponseModel : ResponseModel
|
|||||||
public bool UseOrganizationDomains { get; set; }
|
public bool UseOrganizationDomains { get; set; }
|
||||||
public bool UseAdminSponsoredFamilies { get; set; }
|
public bool UseAdminSponsoredFamilies { get; set; }
|
||||||
public bool UseAutomaticUserConfirmation { get; set; }
|
public bool UseAutomaticUserConfirmation { get; set; }
|
||||||
|
public bool UsePhishingBlocker { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class OrganizationSubscriptionResponseModel : OrganizationResponseModel
|
public class OrganizationSubscriptionResponseModel : OrganizationResponseModel
|
||||||
|
|||||||
@@ -134,6 +134,11 @@ public class Organization : ITableObject<Guid>, IStorableSubscriber, IRevisable
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public bool UseAutomaticUserConfirmation { get; set; }
|
public bool UseAutomaticUserConfirmation { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// If set to true, the organization has phishing protection enabled.
|
||||||
|
/// </summary>
|
||||||
|
public bool UsePhishingBlocker { get; set; }
|
||||||
|
|
||||||
public void SetNewId()
|
public void SetNewId()
|
||||||
{
|
{
|
||||||
if (Id == default(Guid))
|
if (Id == default(Guid))
|
||||||
@@ -334,5 +339,6 @@ public class Organization : ITableObject<Guid>, IStorableSubscriber, IRevisable
|
|||||||
UseOrganizationDomains = license.UseOrganizationDomains;
|
UseOrganizationDomains = license.UseOrganizationDomains;
|
||||||
UseAdminSponsoredFamilies = license.UseAdminSponsoredFamilies;
|
UseAdminSponsoredFamilies = license.UseAdminSponsoredFamilies;
|
||||||
UseAutomaticUserConfirmation = license.UseAutomaticUserConfirmation;
|
UseAutomaticUserConfirmation = license.UseAutomaticUserConfirmation;
|
||||||
|
UsePhishingBlocker = license.UsePhishingBlocker;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -53,4 +53,5 @@ public interface IProfileOrganizationDetails
|
|||||||
bool UseAdminSponsoredFamilies { get; set; }
|
bool UseAdminSponsoredFamilies { get; set; }
|
||||||
bool UseOrganizationDomains { get; set; }
|
bool UseOrganizationDomains { get; set; }
|
||||||
bool UseAutomaticUserConfirmation { get; set; }
|
bool UseAutomaticUserConfirmation { get; set; }
|
||||||
|
bool UsePhishingBlocker { get; set; }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ public class OrganizationAbility
|
|||||||
UseOrganizationDomains = organization.UseOrganizationDomains;
|
UseOrganizationDomains = organization.UseOrganizationDomains;
|
||||||
UseAdminSponsoredFamilies = organization.UseAdminSponsoredFamilies;
|
UseAdminSponsoredFamilies = organization.UseAdminSponsoredFamilies;
|
||||||
UseAutomaticUserConfirmation = organization.UseAutomaticUserConfirmation;
|
UseAutomaticUserConfirmation = organization.UseAutomaticUserConfirmation;
|
||||||
|
UsePhishingBlocker = organization.UsePhishingBlocker;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Guid Id { get; set; }
|
public Guid Id { get; set; }
|
||||||
@@ -51,4 +52,5 @@ public class OrganizationAbility
|
|||||||
public bool UseOrganizationDomains { get; set; }
|
public bool UseOrganizationDomains { get; set; }
|
||||||
public bool UseAdminSponsoredFamilies { get; set; }
|
public bool UseAdminSponsoredFamilies { get; set; }
|
||||||
public bool UseAutomaticUserConfirmation { get; set; }
|
public bool UseAutomaticUserConfirmation { get; set; }
|
||||||
|
public bool UsePhishingBlocker { get; set; }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -65,4 +65,5 @@ public class OrganizationUserOrganizationDetails : IProfileOrganizationDetails
|
|||||||
public bool UseAdminSponsoredFamilies { get; set; }
|
public bool UseAdminSponsoredFamilies { get; set; }
|
||||||
public bool? IsAdminInitiated { get; set; }
|
public bool? IsAdminInitiated { get; set; }
|
||||||
public bool UseAutomaticUserConfirmation { get; set; }
|
public bool UseAutomaticUserConfirmation { get; set; }
|
||||||
|
public bool UsePhishingBlocker { get; set; }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -154,6 +154,7 @@ public class SelfHostedOrganizationDetails : Organization
|
|||||||
Status = Status,
|
Status = Status,
|
||||||
UseRiskInsights = UseRiskInsights,
|
UseRiskInsights = UseRiskInsights,
|
||||||
UseAdminSponsoredFamilies = UseAdminSponsoredFamilies,
|
UseAdminSponsoredFamilies = UseAdminSponsoredFamilies,
|
||||||
|
UsePhishingBlocker = UsePhishingBlocker,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -56,4 +56,5 @@ public class ProviderUserOrganizationDetails : IProfileOrganizationDetails
|
|||||||
public string? SsoExternalId { get; set; }
|
public string? SsoExternalId { get; set; }
|
||||||
public string? Permissions { get; set; }
|
public string? Permissions { get; set; }
|
||||||
public string? ResetPasswordKey { get; set; }
|
public string? ResetPasswordKey { get; set; }
|
||||||
|
public bool UsePhishingBlocker { get; set; }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -62,6 +62,7 @@ public static class OrganizationFactory
|
|||||||
UseAdminSponsoredFamilies =
|
UseAdminSponsoredFamilies =
|
||||||
claimsPrincipal.GetValue<bool>(OrganizationLicenseConstants.UseAdminSponsoredFamilies),
|
claimsPrincipal.GetValue<bool>(OrganizationLicenseConstants.UseAdminSponsoredFamilies),
|
||||||
UseAutomaticUserConfirmation = claimsPrincipal.GetValue<bool>(OrganizationLicenseConstants.UseAutomaticUserConfirmation),
|
UseAutomaticUserConfirmation = claimsPrincipal.GetValue<bool>(OrganizationLicenseConstants.UseAutomaticUserConfirmation),
|
||||||
|
UsePhishingBlocker = claimsPrincipal.GetValue<bool>(OrganizationLicenseConstants.UsePhishingBlocker),
|
||||||
};
|
};
|
||||||
|
|
||||||
public static Organization Create(
|
public static Organization Create(
|
||||||
@@ -111,6 +112,7 @@ public static class OrganizationFactory
|
|||||||
UseRiskInsights = license.UseRiskInsights,
|
UseRiskInsights = license.UseRiskInsights,
|
||||||
UseOrganizationDomains = license.UseOrganizationDomains,
|
UseOrganizationDomains = license.UseOrganizationDomains,
|
||||||
UseAdminSponsoredFamilies = license.UseAdminSponsoredFamilies,
|
UseAdminSponsoredFamilies = license.UseAdminSponsoredFamilies,
|
||||||
UseAutomaticUserConfirmation = license.UseAutomaticUserConfirmation
|
UseAutomaticUserConfirmation = license.UseAutomaticUserConfirmation,
|
||||||
|
UsePhishingBlocker = license.UsePhishingBlocker,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -44,6 +44,7 @@ public static class OrganizationLicenseConstants
|
|||||||
public const string UseAdminSponsoredFamilies = nameof(UseAdminSponsoredFamilies);
|
public const string UseAdminSponsoredFamilies = nameof(UseAdminSponsoredFamilies);
|
||||||
public const string UseOrganizationDomains = nameof(UseOrganizationDomains);
|
public const string UseOrganizationDomains = nameof(UseOrganizationDomains);
|
||||||
public const string UseAutomaticUserConfirmation = nameof(UseAutomaticUserConfirmation);
|
public const string UseAutomaticUserConfirmation = nameof(UseAutomaticUserConfirmation);
|
||||||
|
public const string UsePhishingBlocker = nameof(UsePhishingBlocker);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class UserLicenseConstants
|
public static class UserLicenseConstants
|
||||||
|
|||||||
@@ -57,6 +57,7 @@ public class OrganizationLicenseClaimsFactory : ILicenseClaimsFactory<Organizati
|
|||||||
new(nameof(OrganizationLicenseConstants.UseAdminSponsoredFamilies), entity.UseAdminSponsoredFamilies.ToString()),
|
new(nameof(OrganizationLicenseConstants.UseAdminSponsoredFamilies), entity.UseAdminSponsoredFamilies.ToString()),
|
||||||
new(nameof(OrganizationLicenseConstants.UseOrganizationDomains), entity.UseOrganizationDomains.ToString()),
|
new(nameof(OrganizationLicenseConstants.UseOrganizationDomains), entity.UseOrganizationDomains.ToString()),
|
||||||
new(nameof(OrganizationLicenseConstants.UseAutomaticUserConfirmation), entity.UseAutomaticUserConfirmation.ToString()),
|
new(nameof(OrganizationLicenseConstants.UseAutomaticUserConfirmation), entity.UseAutomaticUserConfirmation.ToString()),
|
||||||
|
new(nameof(OrganizationLicenseConstants.UsePhishingBlocker), entity.UsePhishingBlocker.ToString()),
|
||||||
};
|
};
|
||||||
|
|
||||||
if (entity.Name is not null)
|
if (entity.Name is not null)
|
||||||
|
|||||||
@@ -143,6 +143,7 @@ public class OrganizationLicense : ILicense
|
|||||||
public int? SmSeats { get; set; }
|
public int? SmSeats { get; set; }
|
||||||
public int? SmServiceAccounts { get; set; }
|
public int? SmServiceAccounts { get; set; }
|
||||||
public bool UseRiskInsights { get; set; }
|
public bool UseRiskInsights { get; set; }
|
||||||
|
public bool UsePhishingBlocker { get; set; }
|
||||||
|
|
||||||
// Deprecated. Left for backwards compatibility with old license versions.
|
// Deprecated. Left for backwards compatibility with old license versions.
|
||||||
public bool LimitCollectionCreationDeletion { get; set; } = true;
|
public bool LimitCollectionCreationDeletion { get; set; } = true;
|
||||||
@@ -228,7 +229,8 @@ public class OrganizationLicense : ILicense
|
|||||||
!p.Name.Equals(nameof(UseRiskInsights)) &&
|
!p.Name.Equals(nameof(UseRiskInsights)) &&
|
||||||
!p.Name.Equals(nameof(UseAdminSponsoredFamilies)) &&
|
!p.Name.Equals(nameof(UseAdminSponsoredFamilies)) &&
|
||||||
!p.Name.Equals(nameof(UseOrganizationDomains)) &&
|
!p.Name.Equals(nameof(UseOrganizationDomains)) &&
|
||||||
!p.Name.Equals(nameof(UseAutomaticUserConfirmation)))
|
!p.Name.Equals(nameof(UseAutomaticUserConfirmation)) &&
|
||||||
|
!p.Name.Equals(nameof(UsePhishingBlocker)))
|
||||||
.OrderBy(p => p.Name)
|
.OrderBy(p => p.Name)
|
||||||
.Select(p => $"{p.Name}:{Core.Utilities.CoreHelpers.FormatLicenseSignatureValue(p.GetValue(this, null))}")
|
.Select(p => $"{p.Name}:{Core.Utilities.CoreHelpers.FormatLicenseSignatureValue(p.GetValue(this, null))}")
|
||||||
.Aggregate((c, n) => $"{c}|{n}");
|
.Aggregate((c, n) => $"{c}|{n}");
|
||||||
|
|||||||
@@ -113,7 +113,8 @@ public class OrganizationRepository : Repository<Core.AdminConsole.Entities.Orga
|
|||||||
UseRiskInsights = e.UseRiskInsights,
|
UseRiskInsights = e.UseRiskInsights,
|
||||||
UseOrganizationDomains = e.UseOrganizationDomains,
|
UseOrganizationDomains = e.UseOrganizationDomains,
|
||||||
UseAdminSponsoredFamilies = e.UseAdminSponsoredFamilies,
|
UseAdminSponsoredFamilies = e.UseAdminSponsoredFamilies,
|
||||||
UseAutomaticUserConfirmation = e.UseAutomaticUserConfirmation
|
UseAutomaticUserConfirmation = e.UseAutomaticUserConfirmation,
|
||||||
|
UsePhishingBlocker = e.UsePhishingBlocker
|
||||||
}).ToListAsync();
|
}).ToListAsync();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -74,7 +74,8 @@ public class OrganizationUserOrganizationDetailsViewQuery : IQuery<OrganizationU
|
|||||||
LimitItemDeletion = o.LimitItemDeletion,
|
LimitItemDeletion = o.LimitItemDeletion,
|
||||||
IsAdminInitiated = os.IsAdminInitiated,
|
IsAdminInitiated = os.IsAdminInitiated,
|
||||||
UseOrganizationDomains = o.UseOrganizationDomains,
|
UseOrganizationDomains = o.UseOrganizationDomains,
|
||||||
UseAutomaticUserConfirmation = o.UseAutomaticUserConfirmation
|
UseAutomaticUserConfirmation = o.UseAutomaticUserConfirmation,
|
||||||
|
UsePhishingBlocker = o.UsePhishingBlocker
|
||||||
};
|
};
|
||||||
return query;
|
return query;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -61,6 +61,7 @@ public class ProviderUserOrganizationDetailsViewQuery : IQuery<ProviderUserOrgan
|
|||||||
UseAutomaticUserConfirmation = x.o.UseAutomaticUserConfirmation,
|
UseAutomaticUserConfirmation = x.o.UseAutomaticUserConfirmation,
|
||||||
SsoEnabled = x.ss.Enabled,
|
SsoEnabled = x.ss.Enabled,
|
||||||
SsoConfig = x.ss.Data,
|
SsoConfig = x.ss.Data,
|
||||||
|
UsePhishingBlocker = x.o.UsePhishingBlocker
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -59,7 +59,8 @@ CREATE PROCEDURE [dbo].[Organization_Create]
|
|||||||
@UseOrganizationDomains BIT = 0,
|
@UseOrganizationDomains BIT = 0,
|
||||||
@UseAdminSponsoredFamilies BIT = 0,
|
@UseAdminSponsoredFamilies BIT = 0,
|
||||||
@SyncSeats BIT = 0,
|
@SyncSeats BIT = 0,
|
||||||
@UseAutomaticUserConfirmation BIT = 0
|
@UseAutomaticUserConfirmation BIT = 0,
|
||||||
|
@UsePhishingBlocker BIT = 0
|
||||||
AS
|
AS
|
||||||
BEGIN
|
BEGIN
|
||||||
SET NOCOUNT ON
|
SET NOCOUNT ON
|
||||||
@@ -126,7 +127,8 @@ BEGIN
|
|||||||
[UseOrganizationDomains],
|
[UseOrganizationDomains],
|
||||||
[UseAdminSponsoredFamilies],
|
[UseAdminSponsoredFamilies],
|
||||||
[SyncSeats],
|
[SyncSeats],
|
||||||
[UseAutomaticUserConfirmation]
|
[UseAutomaticUserConfirmation],
|
||||||
|
[UsePhishingBlocker]
|
||||||
)
|
)
|
||||||
VALUES
|
VALUES
|
||||||
(
|
(
|
||||||
@@ -190,6 +192,7 @@ BEGIN
|
|||||||
@UseOrganizationDomains,
|
@UseOrganizationDomains,
|
||||||
@UseAdminSponsoredFamilies,
|
@UseAdminSponsoredFamilies,
|
||||||
@SyncSeats,
|
@SyncSeats,
|
||||||
@UseAutomaticUserConfirmation
|
@UseAutomaticUserConfirmation,
|
||||||
|
@UsePhishingBlocker
|
||||||
);
|
);
|
||||||
END
|
END
|
||||||
|
|||||||
@@ -28,7 +28,8 @@ BEGIN
|
|||||||
[LimitItemDeletion],
|
[LimitItemDeletion],
|
||||||
[UseOrganizationDomains],
|
[UseOrganizationDomains],
|
||||||
[UseAdminSponsoredFamilies],
|
[UseAdminSponsoredFamilies],
|
||||||
[UseAutomaticUserConfirmation]
|
[UseAutomaticUserConfirmation],
|
||||||
|
[UsePhishingBlocker]
|
||||||
FROM
|
FROM
|
||||||
[dbo].[Organization]
|
[dbo].[Organization]
|
||||||
END
|
END
|
||||||
|
|||||||
@@ -59,7 +59,8 @@ CREATE PROCEDURE [dbo].[Organization_Update]
|
|||||||
@UseOrganizationDomains BIT = 0,
|
@UseOrganizationDomains BIT = 0,
|
||||||
@UseAdminSponsoredFamilies BIT = 0,
|
@UseAdminSponsoredFamilies BIT = 0,
|
||||||
@SyncSeats BIT = 0,
|
@SyncSeats BIT = 0,
|
||||||
@UseAutomaticUserConfirmation BIT = 0
|
@UseAutomaticUserConfirmation BIT = 0,
|
||||||
|
@UsePhishingBlocker BIT = 0
|
||||||
AS
|
AS
|
||||||
BEGIN
|
BEGIN
|
||||||
SET NOCOUNT ON
|
SET NOCOUNT ON
|
||||||
@@ -126,7 +127,8 @@ BEGIN
|
|||||||
[UseOrganizationDomains] = @UseOrganizationDomains,
|
[UseOrganizationDomains] = @UseOrganizationDomains,
|
||||||
[UseAdminSponsoredFamilies] = @UseAdminSponsoredFamilies,
|
[UseAdminSponsoredFamilies] = @UseAdminSponsoredFamilies,
|
||||||
[SyncSeats] = @SyncSeats,
|
[SyncSeats] = @SyncSeats,
|
||||||
[UseAutomaticUserConfirmation] = @UseAutomaticUserConfirmation
|
[UseAutomaticUserConfirmation] = @UseAutomaticUserConfirmation,
|
||||||
|
[UsePhishingBlocker] = @UsePhishingBlocker
|
||||||
WHERE
|
WHERE
|
||||||
[Id] = @Id;
|
[Id] = @Id;
|
||||||
END
|
END
|
||||||
|
|||||||
@@ -61,6 +61,7 @@ CREATE TABLE [dbo].[Organization] (
|
|||||||
[SyncSeats] BIT NOT NULL CONSTRAINT [DF_Organization_SyncSeats] DEFAULT (0),
|
[SyncSeats] BIT NOT NULL CONSTRAINT [DF_Organization_SyncSeats] DEFAULT (0),
|
||||||
[UseAutomaticUserConfirmation] BIT NOT NULL CONSTRAINT [DF_Organization_UseAutomaticUserConfirmation] DEFAULT (0),
|
[UseAutomaticUserConfirmation] BIT NOT NULL CONSTRAINT [DF_Organization_UseAutomaticUserConfirmation] DEFAULT (0),
|
||||||
[MaxStorageGbIncreased] SMALLINT NULL,
|
[MaxStorageGbIncreased] SMALLINT NULL,
|
||||||
|
[UsePhishingBlocker] BIT NOT NULL CONSTRAINT [DF_Organization_UsePhishingBlocker] DEFAULT (0),
|
||||||
CONSTRAINT [PK_Organization] PRIMARY KEY CLUSTERED ([Id] ASC)
|
CONSTRAINT [PK_Organization] PRIMARY KEY CLUSTERED ([Id] ASC)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -55,7 +55,8 @@ SELECT
|
|||||||
O.[UseAdminSponsoredFamilies],
|
O.[UseAdminSponsoredFamilies],
|
||||||
O.[UseOrganizationDomains],
|
O.[UseOrganizationDomains],
|
||||||
OS.[IsAdminInitiated],
|
OS.[IsAdminInitiated],
|
||||||
O.[UseAutomaticUserConfirmation]
|
O.[UseAutomaticUserConfirmation],
|
||||||
|
O.[UsePhishingBlocker]
|
||||||
FROM
|
FROM
|
||||||
[dbo].[OrganizationUser] OU
|
[dbo].[OrganizationUser] OU
|
||||||
LEFT JOIN
|
LEFT JOIN
|
||||||
|
|||||||
@@ -61,6 +61,7 @@ SELECT
|
|||||||
[UseOrganizationDomains],
|
[UseOrganizationDomains],
|
||||||
[UseAdminSponsoredFamilies],
|
[UseAdminSponsoredFamilies],
|
||||||
[SyncSeats],
|
[SyncSeats],
|
||||||
[UseAutomaticUserConfirmation]
|
[UseAutomaticUserConfirmation],
|
||||||
|
[UsePhishingBlocker]
|
||||||
FROM
|
FROM
|
||||||
[dbo].[Organization]
|
[dbo].[Organization]
|
||||||
|
|||||||
@@ -44,7 +44,8 @@ SELECT
|
|||||||
O.[UseOrganizationDomains],
|
O.[UseOrganizationDomains],
|
||||||
O.[UseAutomaticUserConfirmation],
|
O.[UseAutomaticUserConfirmation],
|
||||||
SS.[Enabled] SsoEnabled,
|
SS.[Enabled] SsoEnabled,
|
||||||
SS.[Data] SsoConfig
|
SS.[Data] SsoConfig,
|
||||||
|
O.[UsePhishingBlocker]
|
||||||
FROM
|
FROM
|
||||||
[dbo].[ProviderUser] PU
|
[dbo].[ProviderUser] PU
|
||||||
INNER JOIN
|
INNER JOIN
|
||||||
|
|||||||
@@ -48,6 +48,7 @@ public class ProfileOrganizationResponseModelTests
|
|||||||
UsersGetPremium = organization.UsersGetPremium,
|
UsersGetPremium = organization.UsersGetPremium,
|
||||||
UseCustomPermissions = organization.UseCustomPermissions,
|
UseCustomPermissions = organization.UseCustomPermissions,
|
||||||
UseRiskInsights = organization.UseRiskInsights,
|
UseRiskInsights = organization.UseRiskInsights,
|
||||||
|
UsePhishingBlocker = organization.UsePhishingBlocker,
|
||||||
UseOrganizationDomains = organization.UseOrganizationDomains,
|
UseOrganizationDomains = organization.UseOrganizationDomains,
|
||||||
UseAdminSponsoredFamilies = organization.UseAdminSponsoredFamilies,
|
UseAdminSponsoredFamilies = organization.UseAdminSponsoredFamilies,
|
||||||
UseAutomaticUserConfirmation = organization.UseAutomaticUserConfirmation,
|
UseAutomaticUserConfirmation = organization.UseAutomaticUserConfirmation,
|
||||||
|
|||||||
@@ -45,6 +45,7 @@ public class ProfileProviderOrganizationResponseModelTests
|
|||||||
UsersGetPremium = organization.UsersGetPremium,
|
UsersGetPremium = organization.UsersGetPremium,
|
||||||
UseCustomPermissions = organization.UseCustomPermissions,
|
UseCustomPermissions = organization.UseCustomPermissions,
|
||||||
UseRiskInsights = organization.UseRiskInsights,
|
UseRiskInsights = organization.UseRiskInsights,
|
||||||
|
UsePhishingBlocker = organization.UsePhishingBlocker,
|
||||||
UseOrganizationDomains = organization.UseOrganizationDomains,
|
UseOrganizationDomains = organization.UseOrganizationDomains,
|
||||||
UseAdminSponsoredFamilies = organization.UseAdminSponsoredFamilies,
|
UseAdminSponsoredFamilies = organization.UseAdminSponsoredFamilies,
|
||||||
UseAutomaticUserConfirmation = organization.UseAutomaticUserConfirmation,
|
UseAutomaticUserConfirmation = organization.UseAutomaticUserConfirmation,
|
||||||
|
|||||||
@@ -213,7 +213,8 @@ If you believe you need to change the version for a valid reason, please discuss
|
|||||||
LimitCollectionDeletion = true,
|
LimitCollectionDeletion = true,
|
||||||
AllowAdminAccessToAllCollectionItems = true,
|
AllowAdminAccessToAllCollectionItems = true,
|
||||||
UseOrganizationDomains = true,
|
UseOrganizationDomains = true,
|
||||||
UseAdminSponsoredFamilies = false
|
UseAdminSponsoredFamilies = false,
|
||||||
|
UsePhishingBlocker = false,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ public class UpdateOrganizationLicenseCommandTests
|
|||||||
"Hash", "Signature", "SignatureBytes", "InstallationId", "Expires",
|
"Hash", "Signature", "SignatureBytes", "InstallationId", "Expires",
|
||||||
"ExpirationWithoutGracePeriod", "Token", "LimitCollectionCreationDeletion",
|
"ExpirationWithoutGracePeriod", "Token", "LimitCollectionCreationDeletion",
|
||||||
"LimitCollectionCreation", "LimitCollectionDeletion", "AllowAdminAccessToAllCollectionItems",
|
"LimitCollectionCreation", "LimitCollectionDeletion", "AllowAdminAccessToAllCollectionItems",
|
||||||
"UseOrganizationDomains", "UseAdminSponsoredFamilies", "UseAutomaticUserConfirmation") &&
|
"UseOrganizationDomains", "UseAdminSponsoredFamilies", "UseAutomaticUserConfirmation", "UsePhishingBlocker") &&
|
||||||
// Same property but different name, use explicit mapping
|
// Same property but different name, use explicit mapping
|
||||||
org.ExpirationDate == license.Expires));
|
org.ExpirationDate == license.Expires));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -93,7 +93,8 @@ public static class OrganizationTestHelpers
|
|||||||
UseOrganizationDomains = true,
|
UseOrganizationDomains = true,
|
||||||
UseAdminSponsoredFamilies = true,
|
UseAdminSponsoredFamilies = true,
|
||||||
SyncSeats = false,
|
SyncSeats = false,
|
||||||
UseAutomaticUserConfirmation = true
|
UseAutomaticUserConfirmation = true,
|
||||||
|
UsePhishingBlocker = true,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -673,7 +673,8 @@ public class OrganizationUserRepositoryTests
|
|||||||
LimitItemDeletion = false,
|
LimitItemDeletion = false,
|
||||||
AllowAdminAccessToAllCollectionItems = false,
|
AllowAdminAccessToAllCollectionItems = false,
|
||||||
UseRiskInsights = false,
|
UseRiskInsights = false,
|
||||||
UseAdminSponsoredFamilies = false
|
UseAdminSponsoredFamilies = false,
|
||||||
|
UsePhishingBlocker = false,
|
||||||
});
|
});
|
||||||
|
|
||||||
var organizationDomain = new OrganizationDomain
|
var organizationDomain = new OrganizationDomain
|
||||||
|
|||||||
@@ -0,0 +1,382 @@
|
|||||||
|
|
||||||
|
/* Introduce new column 'UsePhishingBlocker' not nullable with default of 0 */
|
||||||
|
IF COL_LENGTH('[dbo].[Organization]', 'UsePhishingBlocker') is NULL
|
||||||
|
BEGIN
|
||||||
|
ALTER TABLE [dbo].[Organization] ADD [UsePhishingBlocker] bit NOT NULL CONSTRAINT [DF_Organization_UsePhishingBlocker] default (0)
|
||||||
|
END
|
||||||
|
GO
|
||||||
|
|
||||||
|
/* Update existing stored procedures to include the new column - UsePhishingBlocker */
|
||||||
|
CREATE OR ALTER PROCEDURE [dbo].[Organization_Create]
|
||||||
|
@Id UNIQUEIDENTIFIER OUTPUT,
|
||||||
|
@Identifier NVARCHAR(50),
|
||||||
|
@Name NVARCHAR(50),
|
||||||
|
@BusinessName NVARCHAR(50),
|
||||||
|
@BusinessAddress1 NVARCHAR(50),
|
||||||
|
@BusinessAddress2 NVARCHAR(50),
|
||||||
|
@BusinessAddress3 NVARCHAR(50),
|
||||||
|
@BusinessCountry VARCHAR(2),
|
||||||
|
@BusinessTaxNumber NVARCHAR(30),
|
||||||
|
@BillingEmail NVARCHAR(256),
|
||||||
|
@Plan NVARCHAR(50),
|
||||||
|
@PlanType TINYINT,
|
||||||
|
@Seats INT,
|
||||||
|
@MaxCollections SMALLINT,
|
||||||
|
@UsePolicies BIT,
|
||||||
|
@UseSso BIT,
|
||||||
|
@UseGroups BIT,
|
||||||
|
@UseDirectory BIT,
|
||||||
|
@UseEvents BIT,
|
||||||
|
@UseTotp BIT,
|
||||||
|
@Use2fa BIT,
|
||||||
|
@UseApi BIT,
|
||||||
|
@UseResetPassword BIT,
|
||||||
|
@SelfHost BIT,
|
||||||
|
@UsersGetPremium BIT,
|
||||||
|
@Storage BIGINT,
|
||||||
|
@MaxStorageGb SMALLINT,
|
||||||
|
@Gateway TINYINT,
|
||||||
|
@GatewayCustomerId VARCHAR(50),
|
||||||
|
@GatewaySubscriptionId VARCHAR(50),
|
||||||
|
@ReferenceData VARCHAR(MAX),
|
||||||
|
@Enabled BIT,
|
||||||
|
@LicenseKey VARCHAR(100),
|
||||||
|
@PublicKey VARCHAR(MAX),
|
||||||
|
@PrivateKey VARCHAR(MAX),
|
||||||
|
@TwoFactorProviders NVARCHAR(MAX),
|
||||||
|
@ExpirationDate DATETIME2(7),
|
||||||
|
@CreationDate DATETIME2(7),
|
||||||
|
@RevisionDate DATETIME2(7),
|
||||||
|
@OwnersNotifiedOfAutoscaling DATETIME2(7),
|
||||||
|
@MaxAutoscaleSeats INT,
|
||||||
|
@UseKeyConnector BIT = 0,
|
||||||
|
@UseScim BIT = 0,
|
||||||
|
@UseCustomPermissions BIT = 0,
|
||||||
|
@UseSecretsManager BIT = 0,
|
||||||
|
@Status TINYINT = 0,
|
||||||
|
@UsePasswordManager BIT = 1,
|
||||||
|
@SmSeats INT = null,
|
||||||
|
@SmServiceAccounts INT = null,
|
||||||
|
@MaxAutoscaleSmSeats INT= null,
|
||||||
|
@MaxAutoscaleSmServiceAccounts INT = null,
|
||||||
|
@SecretsManagerBeta BIT = 0,
|
||||||
|
@LimitCollectionCreation BIT = NULL,
|
||||||
|
@LimitCollectionDeletion BIT = NULL,
|
||||||
|
@AllowAdminAccessToAllCollectionItems BIT = 0,
|
||||||
|
@UseRiskInsights BIT = 0,
|
||||||
|
@LimitItemDeletion BIT = 0,
|
||||||
|
@UseOrganizationDomains BIT = 0,
|
||||||
|
@UseAdminSponsoredFamilies BIT = 0,
|
||||||
|
@SyncSeats BIT = 0,
|
||||||
|
@UseAutomaticUserConfirmation BIT = 0,
|
||||||
|
@UsePhishingBlocker BIT = 0
|
||||||
|
AS
|
||||||
|
BEGIN
|
||||||
|
SET NOCOUNT ON
|
||||||
|
|
||||||
|
INSERT INTO [dbo].[Organization]
|
||||||
|
(
|
||||||
|
[Id],
|
||||||
|
[Identifier],
|
||||||
|
[Name],
|
||||||
|
[BusinessName],
|
||||||
|
[BusinessAddress1],
|
||||||
|
[BusinessAddress2],
|
||||||
|
[BusinessAddress3],
|
||||||
|
[BusinessCountry],
|
||||||
|
[BusinessTaxNumber],
|
||||||
|
[BillingEmail],
|
||||||
|
[Plan],
|
||||||
|
[PlanType],
|
||||||
|
[Seats],
|
||||||
|
[MaxCollections],
|
||||||
|
[UsePolicies],
|
||||||
|
[UseSso],
|
||||||
|
[UseGroups],
|
||||||
|
[UseDirectory],
|
||||||
|
[UseEvents],
|
||||||
|
[UseTotp],
|
||||||
|
[Use2fa],
|
||||||
|
[UseApi],
|
||||||
|
[UseResetPassword],
|
||||||
|
[SelfHost],
|
||||||
|
[UsersGetPremium],
|
||||||
|
[Storage],
|
||||||
|
[MaxStorageGb],
|
||||||
|
[Gateway],
|
||||||
|
[GatewayCustomerId],
|
||||||
|
[GatewaySubscriptionId],
|
||||||
|
[ReferenceData],
|
||||||
|
[Enabled],
|
||||||
|
[LicenseKey],
|
||||||
|
[PublicKey],
|
||||||
|
[PrivateKey],
|
||||||
|
[TwoFactorProviders],
|
||||||
|
[ExpirationDate],
|
||||||
|
[CreationDate],
|
||||||
|
[RevisionDate],
|
||||||
|
[OwnersNotifiedOfAutoscaling],
|
||||||
|
[MaxAutoscaleSeats],
|
||||||
|
[UseKeyConnector],
|
||||||
|
[UseScim],
|
||||||
|
[UseCustomPermissions],
|
||||||
|
[UseSecretsManager],
|
||||||
|
[Status],
|
||||||
|
[UsePasswordManager],
|
||||||
|
[SmSeats],
|
||||||
|
[SmServiceAccounts],
|
||||||
|
[MaxAutoscaleSmSeats],
|
||||||
|
[MaxAutoscaleSmServiceAccounts],
|
||||||
|
[SecretsManagerBeta],
|
||||||
|
[LimitCollectionCreation],
|
||||||
|
[LimitCollectionDeletion],
|
||||||
|
[AllowAdminAccessToAllCollectionItems],
|
||||||
|
[UseRiskInsights],
|
||||||
|
[LimitItemDeletion],
|
||||||
|
[UseOrganizationDomains],
|
||||||
|
[UseAdminSponsoredFamilies],
|
||||||
|
[SyncSeats],
|
||||||
|
[UseAutomaticUserConfirmation],
|
||||||
|
[UsePhishingBlocker]
|
||||||
|
)
|
||||||
|
VALUES
|
||||||
|
(
|
||||||
|
@Id,
|
||||||
|
@Identifier,
|
||||||
|
@Name,
|
||||||
|
@BusinessName,
|
||||||
|
@BusinessAddress1,
|
||||||
|
@BusinessAddress2,
|
||||||
|
@BusinessAddress3,
|
||||||
|
@BusinessCountry,
|
||||||
|
@BusinessTaxNumber,
|
||||||
|
@BillingEmail,
|
||||||
|
@Plan,
|
||||||
|
@PlanType,
|
||||||
|
@Seats,
|
||||||
|
@MaxCollections,
|
||||||
|
@UsePolicies,
|
||||||
|
@UseSso,
|
||||||
|
@UseGroups,
|
||||||
|
@UseDirectory,
|
||||||
|
@UseEvents,
|
||||||
|
@UseTotp,
|
||||||
|
@Use2fa,
|
||||||
|
@UseApi,
|
||||||
|
@UseResetPassword,
|
||||||
|
@SelfHost,
|
||||||
|
@UsersGetPremium,
|
||||||
|
@Storage,
|
||||||
|
@MaxStorageGb,
|
||||||
|
@Gateway,
|
||||||
|
@GatewayCustomerId,
|
||||||
|
@GatewaySubscriptionId,
|
||||||
|
@ReferenceData,
|
||||||
|
@Enabled,
|
||||||
|
@LicenseKey,
|
||||||
|
@PublicKey,
|
||||||
|
@PrivateKey,
|
||||||
|
@TwoFactorProviders,
|
||||||
|
@ExpirationDate,
|
||||||
|
@CreationDate,
|
||||||
|
@RevisionDate,
|
||||||
|
@OwnersNotifiedOfAutoscaling,
|
||||||
|
@MaxAutoscaleSeats,
|
||||||
|
@UseKeyConnector,
|
||||||
|
@UseScim,
|
||||||
|
@UseCustomPermissions,
|
||||||
|
@UseSecretsManager,
|
||||||
|
@Status,
|
||||||
|
@UsePasswordManager,
|
||||||
|
@SmSeats,
|
||||||
|
@SmServiceAccounts,
|
||||||
|
@MaxAutoscaleSmSeats,
|
||||||
|
@MaxAutoscaleSmServiceAccounts,
|
||||||
|
@SecretsManagerBeta,
|
||||||
|
@LimitCollectionCreation,
|
||||||
|
@LimitCollectionDeletion,
|
||||||
|
@AllowAdminAccessToAllCollectionItems,
|
||||||
|
@UseRiskInsights,
|
||||||
|
@LimitItemDeletion,
|
||||||
|
@UseOrganizationDomains,
|
||||||
|
@UseAdminSponsoredFamilies,
|
||||||
|
@SyncSeats,
|
||||||
|
@UseAutomaticUserConfirmation,
|
||||||
|
@UsePhishingBlocker
|
||||||
|
);
|
||||||
|
END
|
||||||
|
GO
|
||||||
|
|
||||||
|
/* Update existing stored procedures to include the new column - UsePhishingBlocker */
|
||||||
|
CREATE OR ALTER PROCEDURE [dbo].[Organization_ReadAbilities]
|
||||||
|
AS
|
||||||
|
BEGIN
|
||||||
|
SET NOCOUNT ON
|
||||||
|
|
||||||
|
SELECT
|
||||||
|
[Id],
|
||||||
|
[UseEvents],
|
||||||
|
[Use2fa],
|
||||||
|
CASE
|
||||||
|
WHEN [Use2fa] = 1 AND [TwoFactorProviders] IS NOT NULL AND [TwoFactorProviders] != '{}' THEN
|
||||||
|
1
|
||||||
|
ELSE
|
||||||
|
0
|
||||||
|
END AS [Using2fa],
|
||||||
|
[UsersGetPremium],
|
||||||
|
[UseCustomPermissions],
|
||||||
|
[UseSso],
|
||||||
|
[UseKeyConnector],
|
||||||
|
[UseScim],
|
||||||
|
[UseResetPassword],
|
||||||
|
[UsePolicies],
|
||||||
|
[Enabled],
|
||||||
|
[LimitCollectionCreation],
|
||||||
|
[LimitCollectionDeletion],
|
||||||
|
[AllowAdminAccessToAllCollectionItems],
|
||||||
|
[UseRiskInsights],
|
||||||
|
[LimitItemDeletion],
|
||||||
|
[UseOrganizationDomains],
|
||||||
|
[UseAdminSponsoredFamilies],
|
||||||
|
[UseAutomaticUserConfirmation],
|
||||||
|
[UsePhishingBlocker]
|
||||||
|
FROM
|
||||||
|
[dbo].[Organization]
|
||||||
|
END
|
||||||
|
GO
|
||||||
|
|
||||||
|
/* Update existing stored procedures to include the new column - UsePhishingBlocker */
|
||||||
|
CREATE OR ALTER PROCEDURE [dbo].[Organization_Update]
|
||||||
|
@Id UNIQUEIDENTIFIER,
|
||||||
|
@Identifier NVARCHAR(50),
|
||||||
|
@Name NVARCHAR(50),
|
||||||
|
@BusinessName NVARCHAR(50),
|
||||||
|
@BusinessAddress1 NVARCHAR(50),
|
||||||
|
@BusinessAddress2 NVARCHAR(50),
|
||||||
|
@BusinessAddress3 NVARCHAR(50),
|
||||||
|
@BusinessCountry VARCHAR(2),
|
||||||
|
@BusinessTaxNumber NVARCHAR(30),
|
||||||
|
@BillingEmail NVARCHAR(256),
|
||||||
|
@Plan NVARCHAR(50),
|
||||||
|
@PlanType TINYINT,
|
||||||
|
@Seats INT,
|
||||||
|
@MaxCollections SMALLINT,
|
||||||
|
@UsePolicies BIT,
|
||||||
|
@UseSso BIT,
|
||||||
|
@UseGroups BIT,
|
||||||
|
@UseDirectory BIT,
|
||||||
|
@UseEvents BIT,
|
||||||
|
@UseTotp BIT,
|
||||||
|
@Use2fa BIT,
|
||||||
|
@UseApi BIT,
|
||||||
|
@UseResetPassword BIT,
|
||||||
|
@SelfHost BIT,
|
||||||
|
@UsersGetPremium BIT,
|
||||||
|
@Storage BIGINT,
|
||||||
|
@MaxStorageGb SMALLINT,
|
||||||
|
@Gateway TINYINT,
|
||||||
|
@GatewayCustomerId VARCHAR(50),
|
||||||
|
@GatewaySubscriptionId VARCHAR(50),
|
||||||
|
@ReferenceData VARCHAR(MAX),
|
||||||
|
@Enabled BIT,
|
||||||
|
@LicenseKey VARCHAR(100),
|
||||||
|
@PublicKey VARCHAR(MAX),
|
||||||
|
@PrivateKey VARCHAR(MAX),
|
||||||
|
@TwoFactorProviders NVARCHAR(MAX),
|
||||||
|
@ExpirationDate DATETIME2(7),
|
||||||
|
@CreationDate DATETIME2(7),
|
||||||
|
@RevisionDate DATETIME2(7),
|
||||||
|
@OwnersNotifiedOfAutoscaling DATETIME2(7),
|
||||||
|
@MaxAutoscaleSeats INT,
|
||||||
|
@UseKeyConnector BIT = 0,
|
||||||
|
@UseScim BIT = 0,
|
||||||
|
@UseCustomPermissions BIT = 0,
|
||||||
|
@UseSecretsManager BIT = 0,
|
||||||
|
@Status TINYINT = 0,
|
||||||
|
@UsePasswordManager BIT = 1,
|
||||||
|
@SmSeats INT = null,
|
||||||
|
@SmServiceAccounts INT = null,
|
||||||
|
@MaxAutoscaleSmSeats INT = null,
|
||||||
|
@MaxAutoscaleSmServiceAccounts INT = null,
|
||||||
|
@SecretsManagerBeta BIT = 0,
|
||||||
|
@LimitCollectionCreation BIT = null,
|
||||||
|
@LimitCollectionDeletion BIT = null,
|
||||||
|
@AllowAdminAccessToAllCollectionItems BIT = 0,
|
||||||
|
@UseRiskInsights BIT = 0,
|
||||||
|
@LimitItemDeletion BIT = 0,
|
||||||
|
@UseOrganizationDomains BIT = 0,
|
||||||
|
@UseAdminSponsoredFamilies BIT = 0,
|
||||||
|
@SyncSeats BIT = 0,
|
||||||
|
@UseAutomaticUserConfirmation BIT = 0,
|
||||||
|
@UsePhishingBlocker BIT = 0
|
||||||
|
AS
|
||||||
|
BEGIN
|
||||||
|
SET NOCOUNT ON
|
||||||
|
|
||||||
|
UPDATE
|
||||||
|
[dbo].[Organization]
|
||||||
|
SET
|
||||||
|
[Identifier] = @Identifier,
|
||||||
|
[Name] = @Name,
|
||||||
|
[BusinessName] = @BusinessName,
|
||||||
|
[BusinessAddress1] = @BusinessAddress1,
|
||||||
|
[BusinessAddress2] = @BusinessAddress2,
|
||||||
|
[BusinessAddress3] = @BusinessAddress3,
|
||||||
|
[BusinessCountry] = @BusinessCountry,
|
||||||
|
[BusinessTaxNumber] = @BusinessTaxNumber,
|
||||||
|
[BillingEmail] = @BillingEmail,
|
||||||
|
[Plan] = @Plan,
|
||||||
|
[PlanType] = @PlanType,
|
||||||
|
[Seats] = @Seats,
|
||||||
|
[MaxCollections] = @MaxCollections,
|
||||||
|
[UsePolicies] = @UsePolicies,
|
||||||
|
[UseSso] = @UseSso,
|
||||||
|
[UseGroups] = @UseGroups,
|
||||||
|
[UseDirectory] = @UseDirectory,
|
||||||
|
[UseEvents] = @UseEvents,
|
||||||
|
[UseTotp] = @UseTotp,
|
||||||
|
[Use2fa] = @Use2fa,
|
||||||
|
[UseApi] = @UseApi,
|
||||||
|
[UseResetPassword] = @UseResetPassword,
|
||||||
|
[SelfHost] = @SelfHost,
|
||||||
|
[UsersGetPremium] = @UsersGetPremium,
|
||||||
|
[Storage] = @Storage,
|
||||||
|
[MaxStorageGb] = @MaxStorageGb,
|
||||||
|
[Gateway] = @Gateway,
|
||||||
|
[GatewayCustomerId] = @GatewayCustomerId,
|
||||||
|
[GatewaySubscriptionId] = @GatewaySubscriptionId,
|
||||||
|
[ReferenceData] = @ReferenceData,
|
||||||
|
[Enabled] = @Enabled,
|
||||||
|
[LicenseKey] = @LicenseKey,
|
||||||
|
[PublicKey] = @PublicKey,
|
||||||
|
[PrivateKey] = @PrivateKey,
|
||||||
|
[TwoFactorProviders] = @TwoFactorProviders,
|
||||||
|
[ExpirationDate] = @ExpirationDate,
|
||||||
|
[CreationDate] = @CreationDate,
|
||||||
|
[RevisionDate] = @RevisionDate,
|
||||||
|
[OwnersNotifiedOfAutoscaling] = @OwnersNotifiedOfAutoscaling,
|
||||||
|
[MaxAutoscaleSeats] = @MaxAutoscaleSeats,
|
||||||
|
[UseKeyConnector] = @UseKeyConnector,
|
||||||
|
[UseScim] = @UseScim,
|
||||||
|
[UseCustomPermissions] = @UseCustomPermissions,
|
||||||
|
[UseSecretsManager] = @UseSecretsManager,
|
||||||
|
[Status] = @Status,
|
||||||
|
[UsePasswordManager] = @UsePasswordManager,
|
||||||
|
[SmSeats] = @SmSeats,
|
||||||
|
[SmServiceAccounts] = @SmServiceAccounts,
|
||||||
|
[MaxAutoscaleSmSeats] = @MaxAutoscaleSmSeats,
|
||||||
|
[MaxAutoscaleSmServiceAccounts] = @MaxAutoscaleSmServiceAccounts,
|
||||||
|
[SecretsManagerBeta] = @SecretsManagerBeta,
|
||||||
|
[LimitCollectionCreation] = @LimitCollectionCreation,
|
||||||
|
[LimitCollectionDeletion] = @LimitCollectionDeletion,
|
||||||
|
[AllowAdminAccessToAllCollectionItems] = @AllowAdminAccessToAllCollectionItems,
|
||||||
|
[UseRiskInsights] = @UseRiskInsights,
|
||||||
|
[LimitItemDeletion] = @LimitItemDeletion,
|
||||||
|
[UseOrganizationDomains] = @UseOrganizationDomains,
|
||||||
|
[UseAdminSponsoredFamilies] = @UseAdminSponsoredFamilies,
|
||||||
|
[SyncSeats] = @SyncSeats,
|
||||||
|
[UseAutomaticUserConfirmation] = @UseAutomaticUserConfirmation,
|
||||||
|
[UsePhishingBlocker] = @UsePhishingBlocker
|
||||||
|
WHERE
|
||||||
|
[Id] = @Id;
|
||||||
|
END
|
||||||
@@ -0,0 +1,241 @@
|
|||||||
|
/* Adds the UsePhishingBlocker column to the OrganizationUserOrganizationDetailsView view. */
|
||||||
|
CREATE OR ALTER VIEW [dbo].[OrganizationUserOrganizationDetailsView]
|
||||||
|
AS
|
||||||
|
SELECT
|
||||||
|
OU.[UserId],
|
||||||
|
OU.[OrganizationId],
|
||||||
|
OU.[Id] OrganizationUserId,
|
||||||
|
O.[Name],
|
||||||
|
O.[Enabled],
|
||||||
|
O.[PlanType],
|
||||||
|
O.[UsePolicies],
|
||||||
|
O.[UseSso],
|
||||||
|
O.[UseKeyConnector],
|
||||||
|
O.[UseScim],
|
||||||
|
O.[UseGroups],
|
||||||
|
O.[UseDirectory],
|
||||||
|
O.[UseEvents],
|
||||||
|
O.[UseTotp],
|
||||||
|
O.[Use2fa],
|
||||||
|
O.[UseApi],
|
||||||
|
O.[UseResetPassword],
|
||||||
|
O.[SelfHost],
|
||||||
|
O.[UsersGetPremium],
|
||||||
|
O.[UseCustomPermissions],
|
||||||
|
O.[UseSecretsManager],
|
||||||
|
O.[Seats],
|
||||||
|
O.[MaxCollections],
|
||||||
|
COALESCE(O.[MaxStorageGbIncreased], O.[MaxStorageGb]) AS [MaxStorageGb],
|
||||||
|
O.[Identifier],
|
||||||
|
OU.[Key],
|
||||||
|
OU.[ResetPasswordKey],
|
||||||
|
O.[PublicKey],
|
||||||
|
O.[PrivateKey],
|
||||||
|
OU.[Status],
|
||||||
|
OU.[Type],
|
||||||
|
SU.[ExternalId] SsoExternalId,
|
||||||
|
OU.[Permissions],
|
||||||
|
PO.[ProviderId],
|
||||||
|
P.[Name] ProviderName,
|
||||||
|
P.[Type] ProviderType,
|
||||||
|
SS.[Enabled] SsoEnabled,
|
||||||
|
SS.[Data] SsoConfig,
|
||||||
|
OS.[FriendlyName] FamilySponsorshipFriendlyName,
|
||||||
|
OS.[LastSyncDate] FamilySponsorshipLastSyncDate,
|
||||||
|
OS.[ToDelete] FamilySponsorshipToDelete,
|
||||||
|
OS.[ValidUntil] FamilySponsorshipValidUntil,
|
||||||
|
OU.[AccessSecretsManager],
|
||||||
|
O.[UsePasswordManager],
|
||||||
|
O.[SmSeats],
|
||||||
|
O.[SmServiceAccounts],
|
||||||
|
O.[LimitCollectionCreation],
|
||||||
|
O.[LimitCollectionDeletion],
|
||||||
|
O.[AllowAdminAccessToAllCollectionItems],
|
||||||
|
O.[UseRiskInsights],
|
||||||
|
O.[LimitItemDeletion],
|
||||||
|
O.[UseAdminSponsoredFamilies],
|
||||||
|
O.[UseOrganizationDomains],
|
||||||
|
OS.[IsAdminInitiated],
|
||||||
|
O.[UseAutomaticUserConfirmation],
|
||||||
|
O.[UsePhishingBlocker]
|
||||||
|
FROM
|
||||||
|
[dbo].[OrganizationUser] OU
|
||||||
|
LEFT JOIN
|
||||||
|
[dbo].[Organization] O ON O.[Id] = OU.[OrganizationId]
|
||||||
|
LEFT JOIN
|
||||||
|
[dbo].[SsoUser] SU ON SU.[UserId] = OU.[UserId] AND SU.[OrganizationId] = OU.[OrganizationId]
|
||||||
|
LEFT JOIN
|
||||||
|
[dbo].[ProviderOrganization] PO ON PO.[OrganizationId] = O.[Id]
|
||||||
|
LEFT JOIN
|
||||||
|
[dbo].[Provider] P ON P.[Id] = PO.[ProviderId]
|
||||||
|
LEFT JOIN
|
||||||
|
[dbo].[SsoConfig] SS ON SS.[OrganizationId] = OU.[OrganizationId]
|
||||||
|
LEFT JOIN
|
||||||
|
[dbo].[OrganizationSponsorship] OS ON OS.[SponsoringOrganizationUserID] = OU.[Id]
|
||||||
|
GO
|
||||||
|
|
||||||
|
/* Updates the ProviderUserProviderOrganizationDetailsView view to include the UsePhishingBlocker column. */
|
||||||
|
CREATE OR ALTER VIEW [dbo].[ProviderUserProviderOrganizationDetailsView]
|
||||||
|
AS
|
||||||
|
SELECT
|
||||||
|
PU.[UserId],
|
||||||
|
PO.[OrganizationId],
|
||||||
|
O.[Name],
|
||||||
|
O.[Enabled],
|
||||||
|
O.[UsePolicies],
|
||||||
|
O.[UseSso],
|
||||||
|
O.[UseKeyConnector],
|
||||||
|
O.[UseScim],
|
||||||
|
O.[UseGroups],
|
||||||
|
O.[UseDirectory],
|
||||||
|
O.[UseEvents],
|
||||||
|
O.[UseTotp],
|
||||||
|
O.[Use2fa],
|
||||||
|
O.[UseApi],
|
||||||
|
O.[UseResetPassword],
|
||||||
|
O.[UseSecretsManager],
|
||||||
|
O.[UsePasswordManager],
|
||||||
|
O.[SelfHost],
|
||||||
|
O.[UsersGetPremium],
|
||||||
|
O.[UseCustomPermissions],
|
||||||
|
O.[Seats],
|
||||||
|
O.[MaxCollections],
|
||||||
|
COALESCE(O.[MaxStorageGbIncreased], O.[MaxStorageGb]) AS [MaxStorageGb],
|
||||||
|
O.[Identifier],
|
||||||
|
PO.[Key],
|
||||||
|
O.[PublicKey],
|
||||||
|
O.[PrivateKey],
|
||||||
|
PU.[Status],
|
||||||
|
PU.[Type],
|
||||||
|
PO.[ProviderId],
|
||||||
|
PU.[Id] ProviderUserId,
|
||||||
|
P.[Name] ProviderName,
|
||||||
|
O.[PlanType],
|
||||||
|
O.[LimitCollectionCreation],
|
||||||
|
O.[LimitCollectionDeletion],
|
||||||
|
O.[AllowAdminAccessToAllCollectionItems],
|
||||||
|
O.[UseRiskInsights],
|
||||||
|
O.[UseAdminSponsoredFamilies],
|
||||||
|
P.[Type] ProviderType,
|
||||||
|
O.[LimitItemDeletion],
|
||||||
|
O.[UseOrganizationDomains],
|
||||||
|
O.[UseAutomaticUserConfirmation],
|
||||||
|
SS.[Enabled] SsoEnabled,
|
||||||
|
SS.[Data] SsoConfig,
|
||||||
|
O.[UsePhishingBlocker]
|
||||||
|
FROM
|
||||||
|
[dbo].[ProviderUser] PU
|
||||||
|
INNER JOIN
|
||||||
|
[dbo].[ProviderOrganization] PO ON PO.[ProviderId] = PU.[ProviderId]
|
||||||
|
INNER JOIN
|
||||||
|
[dbo].[Organization] O ON O.[Id] = PO.[OrganizationId]
|
||||||
|
INNER JOIN
|
||||||
|
[dbo].[Provider] P ON P.[Id] = PU.[ProviderId]
|
||||||
|
LEFT JOIN
|
||||||
|
[dbo].[SsoConfig] SS ON SS.[OrganizationId] = O.[Id]
|
||||||
|
GO
|
||||||
|
|
||||||
|
/* Updates the OrganizationView view to include the UsePhishingBlocker column. */
|
||||||
|
CREATE OR ALTER VIEW [dbo].[OrganizationView]
|
||||||
|
AS
|
||||||
|
SELECT
|
||||||
|
[Id],
|
||||||
|
[Identifier],
|
||||||
|
[Name],
|
||||||
|
[BusinessName],
|
||||||
|
[BusinessAddress1],
|
||||||
|
[BusinessAddress2],
|
||||||
|
[BusinessAddress3],
|
||||||
|
[BusinessCountry],
|
||||||
|
[BusinessTaxNumber],
|
||||||
|
[BillingEmail],
|
||||||
|
[Plan],
|
||||||
|
[PlanType],
|
||||||
|
[Seats],
|
||||||
|
[MaxCollections],
|
||||||
|
[UsePolicies],
|
||||||
|
[UseSso],
|
||||||
|
[UseGroups],
|
||||||
|
[UseDirectory],
|
||||||
|
[UseEvents],
|
||||||
|
[UseTotp],
|
||||||
|
[Use2fa],
|
||||||
|
[UseApi],
|
||||||
|
[UseResetPassword],
|
||||||
|
[SelfHost],
|
||||||
|
[UsersGetPremium],
|
||||||
|
[Storage],
|
||||||
|
COALESCE([MaxStorageGbIncreased], [MaxStorageGb]) AS [MaxStorageGb],
|
||||||
|
[Gateway],
|
||||||
|
[GatewayCustomerId],
|
||||||
|
[GatewaySubscriptionId],
|
||||||
|
[ReferenceData],
|
||||||
|
[Enabled],
|
||||||
|
[LicenseKey],
|
||||||
|
[PublicKey],
|
||||||
|
[PrivateKey],
|
||||||
|
[TwoFactorProviders],
|
||||||
|
[ExpirationDate],
|
||||||
|
[CreationDate],
|
||||||
|
[RevisionDate],
|
||||||
|
[OwnersNotifiedOfAutoscaling],
|
||||||
|
[MaxAutoscaleSeats],
|
||||||
|
[UseKeyConnector],
|
||||||
|
[UseScim],
|
||||||
|
[UseCustomPermissions],
|
||||||
|
[UseSecretsManager],
|
||||||
|
[Status],
|
||||||
|
[UsePasswordManager],
|
||||||
|
[SmSeats],
|
||||||
|
[SmServiceAccounts],
|
||||||
|
[MaxAutoscaleSmSeats],
|
||||||
|
[MaxAutoscaleSmServiceAccounts],
|
||||||
|
[SecretsManagerBeta],
|
||||||
|
[LimitCollectionCreation],
|
||||||
|
[LimitCollectionDeletion],
|
||||||
|
[LimitItemDeletion],
|
||||||
|
[AllowAdminAccessToAllCollectionItems],
|
||||||
|
[UseRiskInsights],
|
||||||
|
[UseOrganizationDomains],
|
||||||
|
[UseAdminSponsoredFamilies],
|
||||||
|
[SyncSeats],
|
||||||
|
[UseAutomaticUserConfirmation],
|
||||||
|
[UsePhishingBlocker]
|
||||||
|
FROM
|
||||||
|
[dbo].[Organization]
|
||||||
|
GO
|
||||||
|
|
||||||
|
|
||||||
|
--Manually refresh [dbo].[OrganizationUserOrganizationDetailsView]
|
||||||
|
IF OBJECT_ID('[dbo].[OrganizationUserOrganizationDetailsView]') IS NOT NULL
|
||||||
|
BEGIN
|
||||||
|
EXECUTE sp_refreshsqlmodule N'[dbo].[OrganizationUserOrganizationDetailsView]';
|
||||||
|
END
|
||||||
|
GO
|
||||||
|
|
||||||
|
--Manually refresh [dbo].[ProviderUserProviderOrganizationDetailsView]
|
||||||
|
IF OBJECT_ID('[dbo].[ProviderUserProviderOrganizationDetailsView]') IS NOT NULL
|
||||||
|
BEGIN
|
||||||
|
EXECUTE sp_refreshsqlmodule N'[dbo].[ProviderUserProviderOrganizationDetailsView]';
|
||||||
|
END
|
||||||
|
GO
|
||||||
|
|
||||||
|
--Manually refresh [dbo].[OrganizationView]
|
||||||
|
IF OBJECT_ID('[dbo].[OrganizationView]') IS NOT NULL
|
||||||
|
BEGIN
|
||||||
|
EXECUTE sp_refreshsqlmodule N'[dbo].[OrganizationView]';
|
||||||
|
END
|
||||||
|
GO
|
||||||
|
|
||||||
|
--Manually refresh [dbo].[OrganizationCipherDetailsCollectionsView]
|
||||||
|
IF OBJECT_ID('[dbo].[OrganizationCipherDetailsCollectionsView]') IS NOT NULL
|
||||||
|
BEGIN
|
||||||
|
EXECUTE sp_refreshsqlmodule N'[dbo].[OrganizationCipherDetailsCollectionsView]';
|
||||||
|
END
|
||||||
|
GO
|
||||||
|
--Manually refresh [dbo].[ProviderOrganizationOrganizationDetailsView]
|
||||||
|
IF OBJECT_ID('[dbo].[ProviderOrganizationOrganizationDetailsView]') IS NOT NULL
|
||||||
|
BEGIN
|
||||||
|
EXECUTE sp_refreshsqlmodule N'[dbo].[ProviderOrganizationOrganizationDetailsView]';
|
||||||
|
END
|
||||||
|
GO
|
||||||
3443
util/MySqlMigrations/Migrations/20251121193008_2025-11-21_00_AddUsePhishingBlockerToOrganization.Designer.cs
generated
Normal file
3443
util/MySqlMigrations/Migrations/20251121193008_2025-11-21_00_AddUsePhishingBlockerToOrganization.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,28 @@
|
|||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace Bit.MySqlMigrations.Migrations;
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class _20251121_00_AddUsePhishingBlockerToOrganization : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.AddColumn<bool>(
|
||||||
|
name: "UsePhishingBlocker",
|
||||||
|
table: "Organization",
|
||||||
|
type: "tinyint(1)",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: false);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "UsePhishingBlocker",
|
||||||
|
table: "Organization");
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -244,6 +244,9 @@ namespace Bit.MySqlMigrations.Migrations
|
|||||||
b.Property<bool>("UsePasswordManager")
|
b.Property<bool>("UsePasswordManager")
|
||||||
.HasColumnType("tinyint(1)");
|
.HasColumnType("tinyint(1)");
|
||||||
|
|
||||||
|
b.Property<bool>("UsePhishingBlocker")
|
||||||
|
.HasColumnType("tinyint(1)");
|
||||||
|
|
||||||
b.Property<bool>("UsePolicies")
|
b.Property<bool>("UsePolicies")
|
||||||
.HasColumnType("tinyint(1)");
|
.HasColumnType("tinyint(1)");
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,28 @@
|
|||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace Bit.PostgresMigrations.Migrations;
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class _20251121_00_AddUsePhishingBlockerToOrganization : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.AddColumn<bool>(
|
||||||
|
name: "UsePhishingBlocker",
|
||||||
|
table: "Organization",
|
||||||
|
type: "boolean",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: false);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "UsePhishingBlocker",
|
||||||
|
table: "Organization");
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -246,6 +246,9 @@ namespace Bit.PostgresMigrations.Migrations
|
|||||||
b.Property<bool>("UsePasswordManager")
|
b.Property<bool>("UsePasswordManager")
|
||||||
.HasColumnType("boolean");
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
|
b.Property<bool>("UsePhishingBlocker")
|
||||||
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
b.Property<bool>("UsePolicies")
|
b.Property<bool>("UsePolicies")
|
||||||
.HasColumnType("boolean");
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,28 @@
|
|||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace Bit.SqliteMigrations.Migrations;
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class _20251121_00_AddUsePhishingBlockerToOrganization : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.AddColumn<bool>(
|
||||||
|
name: "UsePhishingBlocker",
|
||||||
|
table: "Organization",
|
||||||
|
type: "INTEGER",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: false);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "UsePhishingBlocker",
|
||||||
|
table: "Organization");
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -239,6 +239,9 @@ namespace Bit.SqliteMigrations.Migrations
|
|||||||
b.Property<bool>("UsePasswordManager")
|
b.Property<bool>("UsePasswordManager")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("INTEGER");
|
||||||
|
|
||||||
|
b.Property<bool>("UsePhishingBlocker")
|
||||||
|
.HasColumnType("INTEGER");
|
||||||
|
|
||||||
b.Property<bool>("UsePolicies")
|
b.Property<bool>("UsePolicies")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("INTEGER");
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user