fix(admin-ui): gate cluster and ACL actions by destination policies
This commit is contained in:
@@ -13,7 +13,9 @@
|
||||
<div class="page-head">
|
||||
<h1>ACLs · <span class="mono">@ClusterId</span></h1>
|
||||
<span class="spacer"></span>
|
||||
<a href="/clusters/@ClusterId/acls/new" class="btn btn-primary btn-sm">New ACL grant</a>
|
||||
<AuthorizeView Policy="@AdminUiPolicies.ConfigEditor">
|
||||
<a href="/clusters/@ClusterId/acls/new" class="btn btn-primary btn-sm">New ACL grant</a>
|
||||
</AuthorizeView>
|
||||
</div>
|
||||
|
||||
<ClusterNav ClusterId="@ClusterId" ActiveTab="acls" />
|
||||
@@ -27,8 +29,8 @@ else
|
||||
<section class="panel notice rise" style="animation-delay:.02s">
|
||||
The <strong>Scope target</strong> column resolves each row against the current configuration. A
|
||||
row marked <span class="chip chip-alert">unresolved</span> points at nothing — it is shipped in
|
||||
every deployment artifact but authorizes nobody, and the deploy gate rejects it. Open it and
|
||||
re-pick the scope.
|
||||
every deployment artifact but authorizes nobody, and the deploy gate rejects it.
|
||||
<AuthorizeView Policy="@AdminUiPolicies.ConfigEditor">Open it and re-pick the scope.</AuthorizeView>
|
||||
</section>
|
||||
|
||||
<section class="panel rise mt-3" style="animation-delay:.08s">
|
||||
@@ -51,7 +53,7 @@ else
|
||||
<th scope="col">Scope target</th>
|
||||
<th scope="col">Permissions</th>
|
||||
<th scope="col">Notes</th>
|
||||
<th scope="col"><span class="visually-hidden">Actions</span></th>
|
||||
<AuthorizeView Policy="@AdminUiPolicies.ConfigEditor"><th scope="col"><span class="visually-hidden">Actions</span></th></AuthorizeView>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -89,7 +91,7 @@ else
|
||||
}
|
||||
</td>
|
||||
<td class="text-muted small" title="@(a.Notes ?? "")">@(string.IsNullOrEmpty(a.Notes) ? "" : DisplayText.Abbreviate(a.Notes, 60))</td>
|
||||
<td><a href="/clusters/@ClusterId/acls/@a.NodeAclId" class="btn btn-sm btn-outline-primary">Edit</a></td>
|
||||
<AuthorizeView Policy="@AdminUiPolicies.ConfigEditor"><td><a href="/clusters/@ClusterId/acls/@a.NodeAclId" class="btn btn-sm btn-outline-primary">Edit</a></td></AuthorizeView>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
|
||||
@@ -12,7 +12,9 @@
|
||||
<div class="page-head">
|
||||
<h1>Clusters</h1>
|
||||
<span class="spacer"></span>
|
||||
<a href="/clusters/new" class="btn btn-primary btn-sm">New cluster</a>
|
||||
<AuthorizeView Policy="@AdminUiPolicies.ConfigEditor">
|
||||
<a href="/clusters/new" class="btn btn-primary btn-sm">New cluster</a>
|
||||
</AuthorizeView>
|
||||
</div>
|
||||
|
||||
@if (_rows is null)
|
||||
@@ -22,7 +24,10 @@
|
||||
else if (_rows.Count == 0)
|
||||
{
|
||||
<section class="panel notice rise" style="animation-delay:.02s">
|
||||
No clusters defined yet. Use <strong>New cluster</strong> above to create one.
|
||||
No clusters defined yet.
|
||||
<AuthorizeView Policy="@AdminUiPolicies.ConfigEditor">
|
||||
Use <strong>New cluster</strong> above to create one.
|
||||
</AuthorizeView>
|
||||
</section>
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user