diff --git a/web/src/admin/applications/entitlements/ApplicationEntitlementForm.ts b/web/src/admin/applications/entitlements/ApplicationEntitlementForm.ts
index fd93ae611578..7a602dca3227 100644
--- a/web/src/admin/applications/entitlements/ApplicationEntitlementForm.ts
+++ b/web/src/admin/applications/entitlements/ApplicationEntitlementForm.ts
@@ -15,10 +15,7 @@ import { customElement, property } from "lit/decorators.js";
import PFContent from "@patternfly/patternfly/components/Content/content.css";
-import {
- ApplicationEntitlement,
- CoreApi,
-} from "@goauthentik/api";
+import { ApplicationEntitlement, CoreApi } from "@goauthentik/api";
@customElement("ak-application-entitlement-form")
export class ApplicationEntitlementForm extends ModelForm {
diff --git a/web/src/admin/applications/entitlements/ApplicationEntitlementPage.ts b/web/src/admin/applications/entitlements/ApplicationEntitlementPage.ts
index 3ad667dc389b..7dc0aca92cd8 100644
--- a/web/src/admin/applications/entitlements/ApplicationEntitlementPage.ts
+++ b/web/src/admin/applications/entitlements/ApplicationEntitlementPage.ts
@@ -1,6 +1,7 @@
import "@goauthentik/admin/applications/entitlements/ApplicationEntitlementForm";
import "@goauthentik/admin/groups/GroupForm";
import "@goauthentik/admin/policies/BoundPoliciesList";
+import { PolicyBindingCheckTarget } from "@goauthentik/admin/policies/utils";
import "@goauthentik/admin/users/UserForm";
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
import { PFSize } from "@goauthentik/common/enums";
@@ -67,20 +68,20 @@ export class ApplicationEntitlementsPage extends Table {
return [
html`${item.name}`,
html`
- ${msg("Update")}
- ${msg("Update Entitlement")}
-
-
-
- `,
+ ${msg("Update")}
+ ${msg("Update Entitlement")}
+
+
+
+ `,
];
}
@@ -94,7 +95,14 @@ export class ApplicationEntitlementsPage extends Table {
"These bindings control which users have access to this entitlement.",
)}
-
+
+
`;
diff --git a/web/src/admin/policies/BoundPoliciesList.ts b/web/src/admin/policies/BoundPoliciesList.ts
index 53b4e07158b1..7cbc2133c129 100644
--- a/web/src/admin/policies/BoundPoliciesList.ts
+++ b/web/src/admin/policies/BoundPoliciesList.ts
@@ -1,6 +1,11 @@
import "@goauthentik/admin/groups/GroupForm";
import "@goauthentik/admin/policies/PolicyBindingForm";
+import { PolicyBindingNotice } from "@goauthentik/admin/policies/PolicyBindingForm";
import "@goauthentik/admin/policies/PolicyWizard";
+import {
+ PolicyBindingCheckTarget,
+ PolicyBindingCheckTargetToLabel,
+} from "@goauthentik/admin/policies/utils";
import "@goauthentik/admin/users/UserForm";
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
import { PFSize } from "@goauthentik/common/enums.js";
@@ -13,7 +18,7 @@ import { PaginatedResponse } from "@goauthentik/elements/table/Table";
import { Table, TableColumn } from "@goauthentik/elements/table/Table";
import { msg, str } from "@lit/localize";
-import { TemplateResult, html } from "lit";
+import { TemplateResult, html, nothing } from "lit";
import { customElement, property } from "lit/decorators.js";
import { ifDefined } from "lit/directives/if-defined.js";
@@ -24,14 +29,25 @@ export class BoundPoliciesList extends Table {
@property()
target?: string;
- @property({ type: Boolean })
- policyOnly = false;
+ @property({ type: Array })
+ allowedTypes: PolicyBindingCheckTarget[] = [
+ PolicyBindingCheckTarget.group,
+ PolicyBindingCheckTarget.user,
+ PolicyBindingCheckTarget.policy,
+ ];
+
+ @property({ type: Array })
+ typeNotices: PolicyBindingNotice[] = [];
checkbox = true;
clearOnRefresh = true;
order = "order";
+ get allowedTypesLabel(): string {
+ return this.allowedTypes.map((ct) => PolicyBindingCheckTargetToLabel(ct)).join(" / ");
+ }
+
async apiEndpoint(): Promise> {
return new PoliciesApi(DEFAULT_CONFIG).policiesBindingsList({
...(await this.defaultEndpointConfig()),
@@ -42,7 +58,7 @@ export class BoundPoliciesList extends Table {
columns(): TableColumn[] {
return [
new TableColumn(msg("Order"), "order"),
- new TableColumn(msg("Policy / User / Group")),
+ new TableColumn(this.allowedTypesLabel),
new TableColumn(msg("Enabled"), "enabled"),
new TableColumn(msg("Timeout"), "timeout"),
new TableColumn(msg("Actions")),
@@ -121,7 +137,7 @@ export class BoundPoliciesList extends Table {
return [
{ key: msg("Order"), value: item.order.toString() },
{
- key: msg("Policy / User / Group"),
+ key: this.allowedTypesLabel,
value: this.getPolicyUserGroupRowLabel(item),
},
];
@@ -156,8 +172,9 @@ export class BoundPoliciesList extends Table {