diff --git a/web/src/pages/policies/BoundPoliciesList.ts b/web/src/pages/policies/BoundPoliciesList.ts index 71a616597..91baf8283 100644 --- a/web/src/pages/policies/BoundPoliciesList.ts +++ b/web/src/pages/policies/BoundPoliciesList.ts @@ -51,7 +51,7 @@ export class BoundPoliciesList extends Table { ]; } - getPolicyUserGroupRow(item: PolicyBinding): string { + getPolicyUserGroupRowLabel(item: PolicyBinding): string { if (item.policy) { return t`Policy ${item.policyObj?.name}`; } else if (item.group) { @@ -63,9 +63,17 @@ export class BoundPoliciesList extends Table { } } + getPolicyUserGroupRow(item: PolicyBinding): TemplateResult { + const label = this.getPolicyUserGroupRowLabel(item); + if (item.user) { + return html` ${label} `; + } + return html`${label}`; + } + getObjectEditButton(item: PolicyBinding): TemplateResult { if (item.policy) { - return html` + return html` ${t`Update`} ${t`Update ${item.policyObj?.name}`} { .metadata=${(item: PolicyBinding) => { return [ { key: t`Order`, value: item.order.toString() }, - { key: t`Policy / User / Group`, value: this.getPolicyUserGroupRow(item) }, + { key: t`Policy / User / Group`, value: this.getPolicyUserGroupRowLabel(item) }, ]; }} .usedBy=${(item: PolicyBinding) => {