From aa0b68f7648bd5a7c14b64737a4f8d3e402bfce5 Mon Sep 17 00:00:00 2001 From: Jake Mannens Date: Wed, 4 Oct 2023 15:59:52 +1100 Subject: Fix SID equality and WellKnownSid mappings --- Pages/Component/AclDialog.razor | 57 ++++++++++++++++++++++--------------- Pages/Component/AclDialog.razor.css | 30 ++++++++++++++++++- Pages/Component/Dialog.razor | 14 +++++++-- Pages/Component/Switch.razor.css | 8 ++++-- 4 files changed, 79 insertions(+), 30 deletions(-) (limited to 'Pages/Component') diff --git a/Pages/Component/AclDialog.razor b/Pages/Component/AclDialog.razor index 8116f04..87fbd6e 100644 --- a/Pages/Component/AclDialog.razor +++ b/Pages/Component/AclDialog.razor @@ -2,35 +2,46 @@ @inject IDbContextFactory dbFactory; @implements IDialog - - @if(obj?.Acl is not null) { - - - - - - - - @foreach(var rule in obj.Acl.Rules.OrderByDescending(r => r.Action)) { - - - - - - + +
+
+ @if(obj?.Acl is not null) { +
ActionSubjectPermissions
@rule.Principal.ToString()@GetActivePermissions(rule) - 🖉 - -
+ + + + + + @foreach(var rule in obj.Acl.Rules.OrderByDescending(r => r.Action)) { + + + + + + + } +
ActionSubjectPermissions
+ @(WellKnownSid.TranslateSid(rule.Principal) ?? rule.Principal.ToString()) + @GetActivePermissions(rule) + 🖉 + +
+
+
Add new
+ } else { +
This item does not have any permissions set!
} - -
-
Add new
+ +
+

Click Edit next to an ACL to edit it's permissions

+
+ + @if(obj?.Acl is not null) { } else { -
This item does not have any permissions set!
diff --git a/Pages/Component/AclDialog.razor.css b/Pages/Component/AclDialog.razor.css index f1b7931..b98cc6d 100644 --- a/Pages/Component/AclDialog.razor.css +++ b/Pages/Component/AclDialog.razor.css @@ -1,4 +1,28 @@ -table p { +div.container { + display: flex; + flex-direction: row; +} + +div.container > div { + width: 50%; +} + +div.container > div:first-child { + border-right: 1px solid white; + padding-right: 15px; +} + +div.container > div:last-child { + padding-left: 15px; + height: stretch; +} + +div.container > div:last-child p { + vertical-align: middle; + text-align: center; +} + +table p { margin: 8px 0 8px 0; } @@ -17,6 +41,10 @@ table td:last-child { font-size: 12pt; } +table td:nth-last-child(2) { + border-right: none !important; +} + table tr:nth-child(2n+1) td:not(:first-child) { background: rgba(255, 255, 255, 0.1); } diff --git a/Pages/Component/Dialog.razor b/Pages/Component/Dialog.razor index 673ec2f..8e8ddca 100644 --- a/Pages/Component/Dialog.razor +++ b/Pages/Component/Dialog.razor @@ -4,7 +4,7 @@