Let admins create and delete users in Benutzerverwaltung, modernize list
Playwright Tests / test (push) Canceled after 0s
Playwright Tests / test (push) Canceled after 0s
Wire up two previously-unwired stored procedures for the usr module: - fis_admin_createUserAccount gained the missing @authaccount + intranet_admin auth gate, a duplicate-email check, and now returns the (possibly auto-generated) password so it can be emailed to the new user, mirroring fis_admin_resetUserPassword's pattern. - fis_admin_delUserAccount gained the same missing auth gate plus a guard against an admin deleting their own account. New /do/usr/create and /do/usr/delete endpoints in IntranetController.AdminUsers.cs, a "Neuer Benutzer" button and a "Benutzer löschen" ribbon action in fis.usr.js, and unit tests for the new welcome-email content (BuildWelcomeEmail). Also restyle the user list (fis.usr.scss) from a plain bordered table to a card-style row grid with avatar-initial badges and status pills, matching the Admin dashboard's visual language. Documented as ADR 0020 and in the admin-user-management concept doc. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
38145a917e
commit
4386a6336a
@@ -12,17 +12,23 @@ AS
|
||||
BEGIN
|
||||
SET NOCOUNT ON;
|
||||
DECLARE @utcnow datetime = GETUTCDATE();
|
||||
DECLARE @auth smallint = [dbo].[fis_admin_getUserAuth](@authaccount);
|
||||
|
||||
IF EXISTS (SELECT * FROM [dbo].[fis_useraccounts] WHERE [useraccount_id] = @useraccount_id and [DateDeleted] is null)
|
||||
BEGIN
|
||||
IF @auth > 1 AND @authaccount <> @useraccount_id
|
||||
BEGIN
|
||||
|
||||
UPDATE [dbo].[fis_useraccounts]
|
||||
SET [UserDeleted] = @authaccount
|
||||
,[DateDeleted] = @utcnow
|
||||
WHERE
|
||||
[useraccount_id] = @useraccount_id;
|
||||
IF EXISTS (SELECT * FROM [dbo].[fis_useraccounts] WHERE [useraccount_id] = @useraccount_id and [DateDeleted] is null)
|
||||
BEGIN
|
||||
|
||||
END
|
||||
UPDATE [dbo].[fis_useraccounts]
|
||||
SET [UserDeleted] = @authaccount
|
||||
,[DateDeleted] = @utcnow
|
||||
WHERE
|
||||
[useraccount_id] = @useraccount_id;
|
||||
|
||||
END
|
||||
|
||||
END
|
||||
|
||||
SELECT CAST((CASE WHEN NOT EXISTS (SELECT * FROM [dbo].[fis_useraccounts] WHERE [useraccount_id] = @useraccount_id and [DateDeleted] is null) THEN 1 ELSE 0 END) as bit);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user