@page "/clusters/{ClusterId}/acls" @attribute [Microsoft.AspNetCore.Authorization.Authorize] @rendermode RenderMode.InteractiveServer @using Microsoft.EntityFrameworkCore @using ZB.MOM.WW.OtOpcUa.Configuration @using ZB.MOM.WW.OtOpcUa.Configuration.Entities @inject IDbContextFactory DbFactory

ACLs · @ClusterId

New ACL grant
@if (_rows is null) {

Loading…

} else {
ACL rows grant LDAP groups specific NodePermissions on a scope (a folder, an equipment, a tag). Per-cluster role grants were dropped in favour of fleet-wide LDAP-group → role mapping; ACLs here are the finer-grained per-node scope.
@_rows.Count ACL row@(_rows.Count == 1 ? "" : "s")
@if (_rows.Count == 0) {
No ACL rows for this cluster — default permissions from the fleet-wide LDAP group mapping apply.
} else {
@foreach (var a in _rows) { }
NodeAclId LDAP group Scope Scope target Permissions Notes
@a.NodeAclId @a.LdapGroup @a.ScopeKind @(a.ScopeId ?? "—") @foreach (var perm in PermissionChips(a.PermissionFlags)) { @perm } @(a.Notes ?? "") Edit
}
} @code { [Parameter] public string ClusterId { get; set; } = ""; private List? _rows; protected override async Task OnInitializedAsync() { await using var db = await DbFactory.CreateDbContextAsync(); _rows = await db.NodeAcls.AsNoTracking() .Where(a => a.ClusterId == ClusterId) .OrderBy(a => a.NodeAclId) .ToListAsync(); } private static IEnumerable PermissionChips(ZB.MOM.WW.OtOpcUa.Configuration.Enums.NodePermissions flags) { foreach (var v in Enum.GetValues()) { // Skip None (zero) and composite values that aren't single bits. var n = (int)v; if (n == 0) continue; if ((n & (n - 1)) != 0) continue; if (flags.HasFlag(v)) yield return v.ToString(); } } }