feat: Add Admin Groups Management Module

- Introduced a new module for managing user groups (`usrgrp`) in the administration interface.
- Implemented CRUD operations for user groups: list, create, rename, and delete.
- Added authorization checks to ensure only users with appropriate permissions can manage groups.
- Created corresponding frontend JavaScript and SCSS files for the new module.
- Updated documentation to reflect the new group management functionality and its authorization model.
- Added SQL stored procedures for group management operations.
- Established a new login script for database access, ensuring proper security practices.
This commit is contained in:
Stefan
2026-09-16 09:35:31 +02:00
parent 1a5ac73f3c
commit 8bcec409c5
59 changed files with 1283 additions and 88 deletions
+18 -2
View File
@@ -16,6 +16,9 @@ public class FdsMfrClient : IDisposable
private readonly MFRClient _mfrClient;
private readonly ILogger<FdsMfrClient> _logger;
// Full-reset merges of large entity tables exceed SqlCommand's 30 s default.
private const int MergeCommandTimeoutSeconds = 600;
private static MFRClientCredentials DefaultCredentials() =>
new(FdsConfig.MFR_UserName, FdsConfig.MFR_Password);
@@ -257,11 +260,24 @@ public class FdsMfrClient : IDisposable
{
tbl.AcceptChanges();
var dtwa = new DatatableWriterAsync(tbl, FdsShared.FDSConnectionString());
dtwa.CommandAfterError = new SqlCommand($"SELECT * INTO [t_{setId.ToLower()}_{tbl.TableName}] FROM {dtwa.DestinationTableName};");
// One fixed debug copy per entity table (last failed batch) instead of a new t_<setid>_ table per attempt.
string fallbackTable = $"t_err_{tbl.TableName}";
dtwa.CommandAfterError = new SqlCommand(
$"DROP TABLE IF EXISTS [{fallbackTable}]; SELECT * INTO [{fallbackTable}] FROM {dtwa.DestinationTableName};")
{ CommandTimeout = MergeCommandTimeoutSeconds };
dtwa.OnCommandAfterError += (sender, caex) =>
_logger.LogError(caex,
"Update__entitytable: merge into {Table} failed ({Entity}, setid={SetId}, rows={Rows}) — staged batch kept in {FallbackTable}",
tbl.TableName, thisEntityName, setId, trc, fallbackTable);
dtwa.OnError += (sender, exc, message) =>
_logger.LogError(exc,
"Update__entitytable: DatatableWriterAsync submission failed for {Table} ({Entity}, setid={SetId}) — {Message}",
tbl.TableName, thisEntityName, setId, message);
dtwa.CommandAfter = new SqlCommand(
$"EXECUTE [dbo].[{tbl.TableName.Replace("__", "__updt__")}] @tblname, @referencetable, @tgtid;" +
"EXECUTE [dbo].[fds__setStatus] @table,@action,@setid,@info;" +
(additionalCommandAfter ?? ""));
(additionalCommandAfter ?? ""))
{ CommandTimeout = MergeCommandTimeoutSeconds };
dtwa.CommandAfter.Parameters.AddRange(new SqlParameter[]
{
new("@tblname", dtwa.DestinationTableName),