mirror of
https://github.com/bitwarden/server.git
synced 2025-06-30 15:42:48 -05:00
[PM-14380] Add GET /tasks/organization endpoint (#5149)
* [PM-14380] Add GetManyByOrganizationIdStatusAsync to SecurityTaskRepository * [PM-14380] Introduce IGetTasksForOrganizationQuery * [PM-14380] Add /tasks/organization endpoint * [PM-14380] Add unit tests * [PM-14380] Formatting * [PM-14380] Bump migration script date * [PM-14380] Bump migration script date
This commit is contained in:
@ -0,0 +1,20 @@
|
||||
CREATE OR ALTER PROCEDURE [dbo].[SecurityTask_ReadByOrganizationIdStatus]
|
||||
@OrganizationId UNIQUEIDENTIFIER,
|
||||
@Status TINYINT = NULL
|
||||
AS
|
||||
BEGIN
|
||||
SET NOCOUNT ON
|
||||
|
||||
SELECT
|
||||
ST.*
|
||||
FROM
|
||||
[dbo].[SecurityTaskView] ST
|
||||
INNER JOIN
|
||||
[dbo].[Organization] O ON O.[Id] = ST.[OrganizationId]
|
||||
WHERE
|
||||
ST.[OrganizationId] = @OrganizationId
|
||||
AND O.[Enabled] = 1
|
||||
AND ST.[Status] = COALESCE(@Status, ST.[Status])
|
||||
ORDER BY ST.[CreationDate] DESC
|
||||
END
|
||||
GO
|
Reference in New Issue
Block a user