Playwright Tests / test (push) Canceled after 0s
Wires the previously-unused fis_admin_* user/group stored procs into the Admin module (fds_sys-gated), adds a users grid with a per-row ribbon (reset password, change email, manage group membership), and always emails a password reset result to the user rather than showing it to the admin. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
34 lines
1.0 KiB
Transact-SQL
34 lines
1.0 KiB
Transact-SQL
|
|
|
|
-- =============================================
|
|
-- Author: <Author,,Name>
|
|
-- Create date: <Create Date, ,>
|
|
-- Description: <Description, ,>
|
|
-- =============================================
|
|
CREATE FUNCTION [dbo].[fis_admin_getUserGroupMembership]
|
|
(
|
|
@authaccount varchar(5)
|
|
, @useraccount_id varchar(5)
|
|
)
|
|
RETURNS @RET TABLE ( [usergroup_id] varchar(5), [name] nvarchar(255) null, [member] bit, [order] int)
|
|
AS
|
|
BEGIN
|
|
DECLARE @auth smallint = [dbo].[fis_admin_getUserAuth](@authaccount);
|
|
|
|
IF @auth > 1
|
|
BEGIN
|
|
INSERT INTO @RET
|
|
SELECT ug.[usergroup_id]
|
|
,CAST(DECRYPTBYKEY(ug.[name_enc]) as nvarchar(255))
|
|
,'member' = CASE WHEN ugm.[useraccount_id] is not null THEN 1 ELSE 0 END
|
|
,'order' = ROW_NUMBER() OVER (ORDER BY CAST(DECRYPTBYKEY(ug.[name_enc]) as nvarchar(255)))
|
|
FROM [dbo].[fis_usergroups] as ug
|
|
LEFT JOIN [dbo].[fis_usergroups_members] as ugm ON ugm.[usergroup_id] = ug.[usergroup_id]
|
|
AND ugm.[useraccount_id] = @useraccount_id AND ugm.[DateDeleted] is null
|
|
WHERE ug.[DateDeleted] is null;
|
|
END
|
|
|
|
RETURN;
|
|
|
|
END
|