mirror of
https://github.com/bitwarden/server.git
synced 2024-11-26 12:55:17 +01:00
add externalid to organizationuser
This commit is contained in:
parent
4656e1f690
commit
b3e4fcca74
@ -14,6 +14,7 @@ namespace Bit.Core.Models.Table
|
|||||||
public OrganizationUserStatusType Status { get; set; }
|
public OrganizationUserStatusType Status { get; set; }
|
||||||
public OrganizationUserType Type { get; set; }
|
public OrganizationUserType Type { get; set; }
|
||||||
public bool AccessAll { get; set; }
|
public bool AccessAll { get; set; }
|
||||||
|
public string ExternalId { get; set; }
|
||||||
public DateTime CreationDate { get; internal set; } = DateTime.UtcNow;
|
public DateTime CreationDate { get; internal set; } = DateTime.UtcNow;
|
||||||
public DateTime RevisionDate { get; internal set; } = DateTime.UtcNow;
|
public DateTime RevisionDate { get; internal set; } = DateTime.UtcNow;
|
||||||
|
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
@Status TINYINT,
|
@Status TINYINT,
|
||||||
@Type TINYINT,
|
@Type TINYINT,
|
||||||
@AccessAll BIT,
|
@AccessAll BIT,
|
||||||
|
@ExternalId NVARCHAR(300),
|
||||||
@CreationDate DATETIME2(7),
|
@CreationDate DATETIME2(7),
|
||||||
@RevisionDate DATETIME2(7)
|
@RevisionDate DATETIME2(7)
|
||||||
AS
|
AS
|
||||||
@ -23,6 +24,7 @@ BEGIN
|
|||||||
[Status],
|
[Status],
|
||||||
[Type],
|
[Type],
|
||||||
[AccessAll],
|
[AccessAll],
|
||||||
|
[ExternalId],
|
||||||
[CreationDate],
|
[CreationDate],
|
||||||
[RevisionDate]
|
[RevisionDate]
|
||||||
)
|
)
|
||||||
@ -36,6 +38,7 @@ BEGIN
|
|||||||
@Status,
|
@Status,
|
||||||
@Type,
|
@Type,
|
||||||
@AccessAll,
|
@AccessAll,
|
||||||
|
@ExternalId,
|
||||||
@CreationDate,
|
@CreationDate,
|
||||||
@RevisionDate
|
@RevisionDate
|
||||||
)
|
)
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
@Status TINYINT,
|
@Status TINYINT,
|
||||||
@Type TINYINT,
|
@Type TINYINT,
|
||||||
@AccessAll BIT,
|
@AccessAll BIT,
|
||||||
|
@ExternalId NVARCHAR(300),
|
||||||
@CreationDate DATETIME2(7),
|
@CreationDate DATETIME2(7),
|
||||||
@RevisionDate DATETIME2(7),
|
@RevisionDate DATETIME2(7),
|
||||||
@Collections AS [dbo].[SelectionReadOnlyArray] READONLY
|
@Collections AS [dbo].[SelectionReadOnlyArray] READONLY
|
||||||
@ -14,7 +15,7 @@ AS
|
|||||||
BEGIN
|
BEGIN
|
||||||
SET NOCOUNT ON
|
SET NOCOUNT ON
|
||||||
|
|
||||||
EXEC [dbo].[OrganizationUser_Create] @Id, @OrganizationId, @UserId, @Email, @Key, @Status, @Type, @AccessAll, @CreationDate, @RevisionDate
|
EXEC [dbo].[OrganizationUser_Create] @Id, @OrganizationId, @UserId, @Email, @Key, @Status, @Type, @AccessAll, @ExternalId, @CreationDate, @RevisionDate
|
||||||
|
|
||||||
;WITH [AvailableCollectionsCTE] AS(
|
;WITH [AvailableCollectionsCTE] AS(
|
||||||
SELECT
|
SELECT
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
@Status TINYINT,
|
@Status TINYINT,
|
||||||
@Type TINYINT,
|
@Type TINYINT,
|
||||||
@AccessAll BIT,
|
@AccessAll BIT,
|
||||||
|
@ExternalId NVARCHAR(300),
|
||||||
@CreationDate DATETIME2(7),
|
@CreationDate DATETIME2(7),
|
||||||
@RevisionDate DATETIME2(7)
|
@RevisionDate DATETIME2(7)
|
||||||
AS
|
AS
|
||||||
@ -23,6 +24,7 @@ BEGIN
|
|||||||
[Status] = @Status,
|
[Status] = @Status,
|
||||||
[Type] = @Type,
|
[Type] = @Type,
|
||||||
[AccessAll] = @AccessAll,
|
[AccessAll] = @AccessAll,
|
||||||
|
[ExternalId] = @ExternalId,
|
||||||
[CreationDate] = @CreationDate,
|
[CreationDate] = @CreationDate,
|
||||||
[RevisionDate] = @RevisionDate
|
[RevisionDate] = @RevisionDate
|
||||||
WHERE
|
WHERE
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
@Status TINYINT,
|
@Status TINYINT,
|
||||||
@Type TINYINT,
|
@Type TINYINT,
|
||||||
@AccessAll BIT,
|
@AccessAll BIT,
|
||||||
|
@ExternalId NVARCHAR(300),
|
||||||
@CreationDate DATETIME2(7),
|
@CreationDate DATETIME2(7),
|
||||||
@RevisionDate DATETIME2(7),
|
@RevisionDate DATETIME2(7),
|
||||||
@Collections AS [dbo].[SelectionReadOnlyArray] READONLY
|
@Collections AS [dbo].[SelectionReadOnlyArray] READONLY
|
||||||
@ -14,7 +15,7 @@ AS
|
|||||||
BEGIN
|
BEGIN
|
||||||
SET NOCOUNT ON
|
SET NOCOUNT ON
|
||||||
|
|
||||||
EXEC [dbo].[OrganizationUser_Update] @Id, @OrganizationId, @UserId, @Email, @Key, @Status, @Type, @AccessAll, @CreationDate, @RevisionDate
|
EXEC [dbo].[OrganizationUser_Update] @Id, @OrganizationId, @UserId, @Email, @Key, @Status, @Type, @AccessAll, @ExternalId, @CreationDate, @RevisionDate
|
||||||
|
|
||||||
;WITH [AvailableCollectionsCTE] AS(
|
;WITH [AvailableCollectionsCTE] AS(
|
||||||
SELECT
|
SELECT
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
[Status] TINYINT NOT NULL,
|
[Status] TINYINT NOT NULL,
|
||||||
[Type] TINYINT NOT NULL,
|
[Type] TINYINT NOT NULL,
|
||||||
[AccessAll] BIT NOT NULL,
|
[AccessAll] BIT NOT NULL,
|
||||||
|
[ExternalId] NVARCHAR (300) NULL,
|
||||||
[CreationDate] DATETIME2 (7) NOT NULL,
|
[CreationDate] DATETIME2 (7) NOT NULL,
|
||||||
[RevisionDate] DATETIME2 (7) NOT NULL,
|
[RevisionDate] DATETIME2 (7) NOT NULL,
|
||||||
CONSTRAINT [PK_OrganizationUser] PRIMARY KEY CLUSTERED ([Id] ASC),
|
CONSTRAINT [PK_OrganizationUser] PRIMARY KEY CLUSTERED ([Id] ASC),
|
||||||
|
@ -8,7 +8,8 @@ SELECT
|
|||||||
ISNULL(U.[Email], OU.[Email]) Email,
|
ISNULL(U.[Email], OU.[Email]) Email,
|
||||||
OU.[Status],
|
OU.[Status],
|
||||||
OU.[Type],
|
OU.[Type],
|
||||||
OU.[AccessAll]
|
OU.[AccessAll],
|
||||||
|
OU.[ExternalId]
|
||||||
FROM
|
FROM
|
||||||
[dbo].[OrganizationUser] OU
|
[dbo].[OrganizationUser] OU
|
||||||
LEFT JOIN
|
LEFT JOIN
|
||||||
|
Loading…
Reference in New Issue
Block a user