mirror of
https://github.com/bitwarden/server.git
synced 2025-07-03 00:52:49 -05:00
org user details apis
This commit is contained in:
@ -142,9 +142,11 @@
|
||||
<Build Include="dbo\Stored Procedures\Grant_ReadBySubjectId.sql" />
|
||||
<Build Include="dbo\Stored Procedures\Grant_Save.sql" />
|
||||
<Build Include="dbo\Stored Procedures\User_ReadAccountRevisionDateById.sql" />
|
||||
<Build Include="dbo\Views\OrganizationUserDetailsView.sql" />
|
||||
<Build Include="dbo\Stored Procedures\OrganizationUserDetails_ReadById.sql" />
|
||||
<Build Include="dbo\Stored Procedures\OrganizationUserDetails_ReadByOrganizationId.sql" />
|
||||
<Build Include="dbo\Views\OrganizationUserUserDetailsView.sql" />
|
||||
<Build Include="dbo\Stored Procedures\OrganizationUserUserDetails_ReadById.sql" />
|
||||
<Build Include="dbo\Stored Procedures\OrganizationUserUserDetails_ReadByOrganizationId.sql" />
|
||||
<Build Include="dbo\Stored Procedures\User_ReadPublicKeyById.sql" />
|
||||
<Build Include="dbo\Stored Procedures\OrganizationUserOrganizationDetails_ReadByUserId.sql" />
|
||||
<Build Include="dbo\Views\OrganizationUserOrganizationDetailsView.sql" />
|
||||
</ItemGroup>
|
||||
</Project>
|
@ -0,0 +1,13 @@
|
||||
CREATE PROCEDURE [dbo].[OrganizationUserOrganizationDetails_ReadByUserId]
|
||||
@UserId UNIQUEIDENTIFIER
|
||||
AS
|
||||
BEGIN
|
||||
SET NOCOUNT ON
|
||||
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
[dbo].[OrganizationUserOrganizationDetailsView]
|
||||
WHERE
|
||||
[UserId] = @UserId
|
||||
END
|
@ -1,4 +1,4 @@
|
||||
CREATE PROCEDURE [dbo].[OrganizationUserDetails_ReadById]
|
||||
CREATE PROCEDURE [dbo].[OrganizationUserUserDetails_ReadById]
|
||||
@Id UNIQUEIDENTIFIER
|
||||
AS
|
||||
BEGIN
|
||||
@ -7,7 +7,7 @@ BEGIN
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
[dbo].[OrganizationUserDetailsView]
|
||||
[dbo].[OrganizationUserUserDetailsView]
|
||||
WHERE
|
||||
[Id] = @Id
|
||||
END
|
@ -1,4 +1,4 @@
|
||||
CREATE PROCEDURE [dbo].[OrganizationUserDetails_ReadByOrganizationId]
|
||||
CREATE PROCEDURE [dbo].[OrganizationUserUserDetails_ReadByOrganizationId]
|
||||
@OrganizationId UNIQUEIDENTIFIER
|
||||
AS
|
||||
BEGIN
|
||||
@ -7,7 +7,7 @@ BEGIN
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
[dbo].[OrganizationUserDetailsView]
|
||||
[dbo].[OrganizationUserUserDetailsView]
|
||||
WHERE
|
||||
[OrganizationId] = @OrganizationId
|
||||
END
|
@ -0,0 +1,12 @@
|
||||
CREATE VIEW [dbo].[OrganizationUserOrganizationDetailsView]
|
||||
AS
|
||||
SELECT
|
||||
OU.[UserId],
|
||||
OU.[OrganizationId],
|
||||
O.[Name],
|
||||
OU.[Key],
|
||||
OU.[Status]
|
||||
FROM
|
||||
[dbo].[OrganizationUser] OU
|
||||
INNER JOIN
|
||||
[dbo].[Organization] O ON O.[Id] = OU.[OrganizationId]
|
@ -1,4 +1,4 @@
|
||||
CREATE VIEW [dbo].[OrganizationUserDetailsView]
|
||||
CREATE VIEW [dbo].[OrganizationUserUserDetailsView]
|
||||
AS
|
||||
SELECT
|
||||
OU.[Id],
|
||||
@ -11,4 +11,4 @@ SELECT
|
||||
FROM
|
||||
[dbo].[OrganizationUser] OU
|
||||
LEFT JOIN
|
||||
[dbo].[User] U ON U.Id = OU.UserId
|
||||
[dbo].[User] U ON U.[Id] = OU.[UserId]
|
Reference in New Issue
Block a user