Show a partial view notice when ACLs are enabled and the mgmt token isn't being used

This commit is contained in:
Michael Lange
2020-11-04 15:24:34 -08:00
parent 916c119269
commit 3cb5bbb0f8
3 changed files with 13 additions and 1 deletions

View File

@@ -14,6 +14,12 @@ export default class Job extends AbstractAbility {
)
canScale;
// TODO: A person can also see all jobs if their token grants read access to all namespaces,
// but given the complexity of namespaces and policy precedence, there isn't a good quick way
// to confirm this.
@or('bypassAuthorization', 'selfTokenIsManagement')
canListAll;
@computed('rulesForActiveNamespace.@each.capabilities')
get policiesSupportRunning() {
return this.activeNamespaceIncludesCapability('submit-job');

View File

@@ -4,6 +4,7 @@
}
.tooltip::after {
text-transform: none;
content: attr(aria-label);
background: $black;
border-radius: $radius;

View File

@@ -7,7 +7,12 @@
<div class="columns">
<div class="column is-narrow">
<div class="boxed-section">
<div class="boxed-section-head">Legend</div>
<div class="boxed-section-head">
Legend
{{#if (cannot "list all jobs")}}
<span aria-label="Your ACL token may limit your ability to list all allocations" class="tag is-warning pull-right tooltip multiline">Partial View</span>
{{/if}}
</div>
<div class="boxed-section-body">
<div class="legend">
<h3 class="legend-label">Metrics</h3>