1
0
mirror of https://github.com/bitwarden/server.git synced 2025-02-01 23:31:41 +01:00

Merge branch 'master' of github.com:bitwarden/server

This commit is contained in:
Kyle Spearrin 2020-09-02 16:44:51 -04:00
commit 3711b6495e
5 changed files with 87 additions and 0 deletions

View File

@ -278,6 +278,7 @@ namespace Bit.Core
public class SsoSettings
{
public int CacheLifetimeInSeconds { get; set; } = 60;
public virtual SamlSettings Saml { get; set; } = new SamlSettings();
public class SamlSettings

View File

@ -412,4 +412,22 @@
<data name="PreValidationError" xml:space="preserve">
<value>Error performing pre validation.</value>
</data>
<data name="Error" xml:space="preserve">
<value>Error</value>
</data>
<data name="SsoError" xml:space="preserve">
<value>There was an unexpected error during single sign-on. Please close this page and try again.</value>
</data>
<data name="SsoErrorWithRedirect" xml:space="preserve">
<value>There was an unexpected error during single sign-on. Please go back to &lt;a href="{0}"&gt;{0}&lt;/a&gt; or close this page and try again.</value>
</data>
<data name="RequestId" xml:space="preserve">
<value>Request ID</value>
</data>
<data name="Redirecting">
<value>Redirecting</value>
</data>
<data name="RedirectingMessage">
<value>You are now being returned to the application. Once complete, you may close this tab.</value>
</data>
</root>

View File

@ -436,6 +436,10 @@ namespace Bit.Core.Utilities
SeatPrice = 6,
AdditionalStoragePricePerGb = 0.5M
},
new Plan
{
Type = PlanType.Custom
},
};
#endregion

View File

@ -23,15 +23,25 @@ BEGIN
COMMIT TRANSACTION Organization_DeleteById_Ciphers
END
BEGIN TRANSACTION Organization_DeleteById
DELETE
FROM
[dbo].[SsoUser]
WHERE
[OrganizationId] = @Id
DELETE
FROM
[dbo].[SsoConfig]
WHERE
[OrganizationId] = @Id
DELETE
FROM
[dbo].[Organization]
WHERE
[Id] = @Id
COMMIT TRANSACTION Organization_DeleteById
END

View File

@ -0,0 +1,54 @@
IF OBJECT_ID('[dbo].[Organization_DeleteById]') IS NOT NULL
BEGIN
DROP PROCEDURE [dbo].[Organization_DeleteById]
END
GO
CREATE PROCEDURE [dbo].[Organization_DeleteById]
@Id UNIQUEIDENTIFIER
AS
BEGIN
SET NOCOUNT ON
EXEC [dbo].[User_BumpAccountRevisionDateByOrganizationId] @Id
DECLARE @BatchSize INT = 100
WHILE @BatchSize > 0
BEGIN
BEGIN TRANSACTION Organization_DeleteById_Ciphers
DELETE TOP(@BatchSize)
FROM
[dbo].[Cipher]
WHERE
[UserId] IS NULL
AND [OrganizationId] = @Id
SET @BatchSize = @@ROWCOUNT
COMMIT TRANSACTION Organization_DeleteById_Ciphers
END
BEGIN TRANSACTION Organization_DeleteById
DELETE
FROM
[dbo].[SsoUser]
WHERE
[OrganizationId] = @Id
DELETE
FROM
[dbo].[SsoConfig]
WHERE
[OrganizationId] = @Id
DELETE
FROM
[dbo].[Organization]
WHERE
[Id] = @Id
COMMIT TRANSACTION Organization_DeleteById
END
GO