diff --git a/web/src/admin/roles/RoleListPage.ts b/web/src/admin/roles/RoleListPage.ts index 2bf8bf64e..328acb186 100644 --- a/web/src/admin/roles/RoleListPage.ts +++ b/web/src/admin/roles/RoleListPage.ts @@ -10,8 +10,11 @@ import { TablePage } from "@goauthentik/elements/table/TablePage"; import "@patternfly/elements/pf-tooltip/pf-tooltip.js"; import { msg } from "@lit/localize"; -import { TemplateResult, html } from "lit"; +import { CSSResult, TemplateResult, html } from "lit"; import { customElement, property } from "lit/decorators.js"; +import { ifDefined } from "lit/directives/if-defined.js"; + +import PFBanner from "@patternfly/patternfly/components/Banner/banner.css"; import { RbacApi, Role } from "@goauthentik/api"; @@ -34,6 +37,10 @@ export class RoleListPage extends TablePage { @property() order = "name"; + static get styles(): CSSResult[] { + return [...super.styles, PFBanner]; + } + async apiEndpoint(page: number): Promise> { return new RbacApi(DEFAULT_CONFIG).rbacRolesList({ ordering: this.order, @@ -69,6 +76,22 @@ export class RoleListPage extends TablePage { `; } + render(): TemplateResult { + return html` + +
+ ${msg("RBAC is in preview.")} + ${msg("Send us feedback!")} +
+
+
${this.renderTable()}
+
`; + } + row(item: Role): TemplateResult[] { return [ html`${item.name}`, diff --git a/web/src/admin/roles/RoleViewPage.ts b/web/src/admin/roles/RoleViewPage.ts index b9a77fac4..8cc2e5d08 100644 --- a/web/src/admin/roles/RoleViewPage.ts +++ b/web/src/admin/roles/RoleViewPage.ts @@ -15,6 +15,7 @@ import { msg, str } from "@lit/localize"; import { CSSResult, TemplateResult, css, html } from "lit"; import { customElement, property, state } from "lit/decorators.js"; +import PFBanner from "@patternfly/patternfly/components/Banner/banner.css"; import PFButton from "@patternfly/patternfly/components/Button/button.css"; import PFCard from "@patternfly/patternfly/components/Card/card.css"; import PFContent from "@patternfly/patternfly/components/Content/content.css"; @@ -52,6 +53,7 @@ export class RoleViewPage extends AKElement { PFContent, PFCard, PFDescriptionList, + PFBanner, css` .pf-c-description-list__description ak-action-button { margin-right: 6px; @@ -85,60 +87,69 @@ export class RoleViewPage extends AKElement { if (!this._role) { return html``; } - return html` -
-
-
-
${msg("Role Info")}
-
-
-
-
- ${msg("Name")} -
-
-
- ${this._role.name} -
-
-
-
+ return html`
+ ${msg("RBAC is in preview.")} + ${msg("Send us feedback!")} +
+ +
+
+
+
${msg("Role Info")}
+
+
+
+
+ ${msg("Name")} +
+
+
+ ${this._role.name} +
+
+
+
+
+
+
+
+ ${msg("Assigned global permissions")} +
+
+ +
+
+
+
+ ${msg("Assigned object permissions")} +
+
+ +
-
-
${msg("Assigned global permissions")}
-
- -
-
-
-
${msg("Assigned object permissions")}
-
- -
-
-
-
- -
`; + + + `; } } diff --git a/web/src/admin/users/UserViewPage.ts b/web/src/admin/users/UserViewPage.ts index d91ea4386..d752f645a 100644 --- a/web/src/admin/users/UserViewPage.ts +++ b/web/src/admin/users/UserViewPage.ts @@ -33,6 +33,7 @@ import { msg, str } from "@lit/localize"; import { css, html, nothing } from "lit"; import { customElement, property, state } from "lit/decorators.js"; +import PFBanner from "@patternfly/patternfly/components/Banner/banner.css"; import PFButton from "@patternfly/patternfly/components/Button/button.css"; import PFCard from "@patternfly/patternfly/components/Card/card.css"; import PFContent from "@patternfly/patternfly/components/Content/content.css"; @@ -86,6 +87,7 @@ export class UserViewPage extends AKElement { PFCard, PFDescriptionList, PFSizing, + PFBanner, css` .ak-button-collection { display: flex; @@ -465,28 +467,38 @@ export class UserViewPage extends AKElement { model=${RbacPermissionsAssignedByUsersListModelEnum.CoreUser} objectPk=${this.user.pk} > -
-
-
-
${msg("Assigned global permissions")}
-
- - -
-
-
-
${msg("Assigned object permissions")}
-
- - -
-
+
+ ${msg("RBAC is in preview.")} + ${msg("Send us feedback!")}
-
+
+
+
+
+ ${msg("Assigned global permissions")} +
+
+ + +
+
+
+
+ ${msg("Assigned object permissions")} +
+
+ + +
+
+
+
+ `; } } diff --git a/web/src/elements/rbac/ObjectPermissionModal.ts b/web/src/elements/rbac/ObjectPermissionModal.ts index 596b2b2c5..e50be6b82 100644 --- a/web/src/elements/rbac/ObjectPermissionModal.ts +++ b/web/src/elements/rbac/ObjectPermissionModal.ts @@ -7,6 +7,7 @@ import { msg } from "@lit/localize"; import { CSSResult, TemplateResult, html } from "lit"; import { customElement, property } from "lit/decorators.js"; +import PFBanner from "@patternfly/patternfly/components/Banner/banner.css"; import PFButton from "@patternfly/patternfly/components/Button/button.css"; import PFBase from "@patternfly/patternfly/patternfly-base.css"; @@ -51,13 +52,17 @@ export class ObjectPermissionModal extends AKElement { objectPk?: string | number; static get styles(): CSSResult[] { - return [PFBase, PFButton]; + return [PFBase, PFButton, PFBanner]; } render(): TemplateResult { return html` ${msg("Update Permissions")} +
+ ${msg("RBAC is in preview.")} + ${msg("Send us feedback!")} +
-
-
-
-
User Object Permissions
-
- - + return html`${this.showBanner + ? html`
+ ${msg("RBAC is in preview.")} + ${msg("Send us feedback!")} +
` + : html``} + +
+
+
+
User Object Permissions
+
+ + +
-
-
-
-
-
-
Role Object Permissions
-
- - +
+
+
+
+
Role Object Permissions
+
+ + +
- -
- `; + + `; } }