diff --git a/web/src/elements/policies/BoundPoliciesList.ts b/web/src/elements/policies/BoundPoliciesList.ts index c608b5149..0f9f344de 100644 --- a/web/src/elements/policies/BoundPoliciesList.ts +++ b/web/src/elements/policies/BoundPoliciesList.ts @@ -49,6 +49,33 @@ export class BoundPoliciesList extends Table { } } + getObjectEditButton(item: PolicyBinding): TemplateResult { + if (item.policy) { + return html` + + ${gettext("Edit Policy")} + +
+
`; + } else if (item.group) { + return html` + + ${gettext("Edit Group")} + +
+
`; + } else if (item.user) { + return html` + + ${gettext("Edit User")} + +
+
`; + } else { + return html``; + } + } + row(item: PolicyBinding): TemplateResult[] { return [ html`${this.getPolicyUserGroupRow(item)}`, @@ -56,15 +83,16 @@ export class BoundPoliciesList extends Table { html`${item.order}`, html`${item.timeout}`, html` + ${this.getObjectEditButton(item)} - ${gettext("Edit")} + ${gettext("Edit Binding")}
- ${gettext("Delete")} + ${gettext("Delete Binding")}
diff --git a/web/src/pages/flows/BoundStagesList.ts b/web/src/pages/flows/BoundStagesList.ts index 43ad54d52..8aed13881 100644 --- a/web/src/pages/flows/BoundStagesList.ts +++ b/web/src/pages/flows/BoundStagesList.ts @@ -45,21 +45,21 @@ export class BoundStagesList extends Table { html`${item.stageObj?.name}`, html`${item.stageObj?.verboseName}`, html` - - - ${gettext("Edit Binding")} - -
-
${gettext("Edit Stage")}
- + + + ${gettext("Edit Binding")} + +
+
+ - ${gettext("Delete")} + ${gettext("Delete Binding")}