From dc28ea67ea7ebecee89dc83761b61ba607d541b4 Mon Sep 17 00:00:00 2001 From: WictorGirardi Date: Fri, 24 Jul 2026 17:46:22 -0300 Subject: [PATCH 1/2] feat: update style docs --- docs/admin-portal/access-control.md | 38 ++++++++------ docs/admin-portal/configuration.md | 64 +++++++++++++++++++++-- docs/getting-started/customizing-ui.md | 71 +++++++++++++++++++++----- 3 files changed, 141 insertions(+), 32 deletions(-) diff --git a/docs/admin-portal/access-control.md b/docs/admin-portal/access-control.md index 3bfe5df8..14f3df6c 100644 --- a/docs/admin-portal/access-control.md +++ b/docs/admin-portal/access-control.md @@ -17,6 +17,7 @@ Profile access requires the User to have the following `account` Client roles. T Access to each of the Organization components is controlled by the User's member roles within the organization. There are no organization default roles, so you must grant these to Users after they are created and added to the organization. Member roles can be managed in the **Organizations** section of the Admin UI by selecting the Organization you wish to manage, finding the User in the **Members** tab, and managing their roles using the context menu on the right. - Details: requires `view-organization` to view, and `manage-organization` to change +- Attributes: requires `view-organization` to view, and `manage-organization` to edit - Members & Invitations: requires `view-organization` - requires `view-members` to see members, and `manage-members` to remove or edit them - requires `view-roles` to see member roles @@ -27,18 +28,25 @@ Access to each of the Organization components is controlled by the User's member Most of the visibility of functionality in the Portal is controlled by user permissions. However, it is also possible to control visibility through Realm Attributes. -When setting the attributes manually, the values are: -| `_providerConfig.portal.profile.enabled` | Profile section (whole) | `true` | -| `_providerConfig.portal.profile.password.enabled` | Password update | `true` | -| `_providerConfig.portal.profile.twofactor.enabled` | 2fa create/update | `true` | -| `_providerConfig.portal.profile.activity.enabled` | Device activity | `true` | -| `_providerConfig.portal.profile.linked.enabled` | Linked accounts | `true` | -| `_providerConfig.portal.org.enabled` | Organizations section (whole) | `true` | -| `_providerConfig.portal.org.details.enabled` | Details edit | `true` | -| `_providerConfig.portal.org.members.enabled` | Members list | `true` | -| `_providerConfig.portal.org.invitations.enabled` | Invitations | `true` | -| `_providerConfig.portal.org.domains.enabled` | Domains | `true` | -| `_providerConfig.portal.org.sso.enabled` | SSO (requires idp-wizard extension) | `true` | -| `_providerConfig.portal.org.events.enabled` | Events | `true` | - -For more on manually setting Realm Attributes for the Admin Portal, view the [Github repo](https://github.com/p2-inc/phasetwo-admin-portal/blob/main/README.md#visibility) \ No newline at end of file +When setting the attributes manually, the values are: + +| Attribute | Controls | Default | +| ----------------------------------------------------- | ----------------------------------------- | ------- | +| `_providerConfig.portal.profile.enabled` | Profile section (whole) | `true` | +| `_providerConfig.portal.profile.password.enabled` | Password update | `true` | +| `_providerConfig.portal.profile.twofactor.enabled` | 2fa create/update | `true` | +| `_providerConfig.portal.profile.passwordless.enabled` | Passwordless WebAuthn credentials | `true` | +| `_providerConfig.portal.profile.activity.enabled` | Device activity | `true` | +| `_providerConfig.portal.profile.linked.enabled` | Linked accounts | `true` | +| `_providerConfig.portal.org.enabled` | Organizations section (whole) | `true` | +| `_providerConfig.portal.org.details.enabled` | Details edit | `true` | +| `_providerConfig.portal.org.members.enabled` | Members list | `true` | +| `_providerConfig.portal.org.invitations.enabled` | Invitations | `true` | +| `_providerConfig.portal.org.attributes.enabled` | Attributes editor (organization settings) | `true` | +| `_providerConfig.portal.org.domains.enabled` | Domains | `true` | +| `_providerConfig.portal.org.sso.enabled` | SSO (requires idp-wizard extension) | `true` | +| `_providerConfig.portal.org.events.enabled` | Events | `true` | + +The comparison is exact and case-sensitive: only the literal lowercase string `true` enables a section. An attribute that is absent falls back to the default above, and any other value — including `TRUE`, `1` or `yes` — disables the section. + +For more on manually setting Realm Attributes for the Admin Portal, view the [Github repo](https://github.com/p2-inc/phasetwo-admin-portal/blob/main/README.md#visibility) diff --git a/docs/admin-portal/configuration.md b/docs/admin-portal/configuration.md index a8489fe6..908ffe78 100644 --- a/docs/admin-portal/configuration.md +++ b/docs/admin-portal/configuration.md @@ -3,11 +3,12 @@ id: configuration title: Configuration --- -In the **Styles**->_Portal_ section of the admin UI, it is possible to configure user access to portions of the portal. This has the effect of limiting the self-management functionality that is available to your users. The sections that can be toggled are: +In the **Styles**->_Portal_ section of the admin UI, it is possible to configure user access to portions of the portal. This has the effect of limiting the self-management functionality that is available to your users. Two of the sections below — _Passwordless_ and _Attributes_ — do not have a checkbox in that panel yet; set their [realm attributes](./access-control.md#setting-realm-attributes-for-manual-control) directly to toggle them. The sections are: - _Profile_ View and edit profile information such as first name, last name and email. View and edit credentials, linked account, and manage authenticated sessions. - _Password update_ Update password. - _2FA create/update_ Add and remove 2FA mechanisms like OTP and WebAuthn. + - _Passwordless_ Add and remove passwordless WebAuthn credentials. - _Device activity_ View and terminate active authentication sessions. - _Linked accounts_ View, create and remove links with social and other identity providers. - _Organizations_ View and (conditionally) edit details of organizations for which a user is a member. @@ -17,6 +18,7 @@ In the **Styles**->_Portal_ section of the admin UI, it is possible to configure - _Domains_ Add and verify email domains for SSO login. - _SSO_ Create and update SSO connections to organization identity provider. - _Events_ View events related to organization member activity. + - _Attributes_ View and manage custom organization attributes. Members with the `view-organization` role see the attribute list; members with `manage-organization` can add, edit and remove entries. ![Keycloak Phase Two Portal Style and Visibility Configuration](/docs/admin-portal-config.png) @@ -26,6 +28,62 @@ Currently, the logo and favicon set in the general styles section will be used w ![Keycloak Phase Two General Logo Configurations](/docs/admin-portal-general-styles.png) -Additionally, you can override three colors used in the portal, and optionally override the entire CSS. See the [Admin Portal source code](https://github.com/p2-inc/phasetwo-admin-portal) for details for overriding the stylesheet. +The portal is built on [shadcn/ui](https://ui.shadcn.com/) components that read their colors from CSS variables. Your branding is applied at runtime: a small set of theme tokens is resolved from realm attributes and injected as a `