diff --git a/images/customizing-user-perspective.png b/images/customizing-user-perspective.png new file mode 100644 index 0000000000..ffa0c674dd Binary files /dev/null and b/images/customizing-user-perspective.png differ diff --git a/modules/odc-customizing-a-perspective-using-YAML-view.adoc b/modules/odc-customizing-a-perspective-using-YAML-view.adoc new file mode 100644 index 0000000000..fd589fb1ff --- /dev/null +++ b/modules/odc-customizing-a-perspective-using-YAML-view.adoc @@ -0,0 +1,79 @@ +// Module included in the following assembly: +// +// * web_console/customizing-the-web-console.adoc + +:_content-type: PROCEDURE +[id="odc-customizing-a-perspective-using-YAML-view_{context}"] += Customizing a perspective using YAML view + +.Prerequisites +* You must have administrator privileges. + +.Procedure +. In the *Administrator* perspective, navigate to *Administration* -> *Cluster Settings*. +. Select the *Configuration* tab and click the *Console (operator.openshift.io)* resource. +. Click the *YAML* tab and make your customization: +.. To enable or disable a perspective, insert the snippet for *Add user perspectives* and edit the YAML code as needed: ++ +[source,yaml] +---- +apiVersion: operator.openshift.io/v1 +kind: Console +metadata: + name: cluster +spec: + customization: + perspectives: + - id: admin + visibility: + state: Enabled + - id: dev + visibility: + state: Enabled +---- +.. To hide a perspective based on RBAC permissions, insert the snippet for *Hide user perspectives* and edit the YAML code as needed: ++ +[source,yaml] +---- +apiVersion: operator.openshift.io/v1 +kind: Console +metadata: + name: cluster +spec: + customization: + perspectives: + - id: admin + requiresAccessReview: + - group: rbac.authorization.k8s.io + resource: clusterroles + verb: list + - id: dev + state: Enabled +---- +.. To customize a perspective based on your needs, create your own YAML snippet: ++ +[source,yaml] +---- +apiVersion: operator.openshift.io/v1 +kind: Console +metadata: + name: cluster +spec: + customization: + perspectives: + - id: admin + visibility: + state: AccessReview + accessReview: + missing: + - resource: deployment + verb: list + required: + - resource: namespaces + verb: list + - id: dev + visibility: + state: Enabled +---- + +. Click *Save*. diff --git a/modules/odc-customizing-a-perspective-using-form-view.adoc b/modules/odc-customizing-a-perspective-using-form-view.adoc new file mode 100644 index 0000000000..1232b2d453 --- /dev/null +++ b/modules/odc-customizing-a-perspective-using-form-view.adoc @@ -0,0 +1,29 @@ +// Module included in the following assembly: +// +// * web_console/customizing-the-web-console.adoc + +:_content-type: PROCEDURE +[id="odc-customizing-a-perspective-using-form-view_{context}"] += Customizing a perspective using form view + +.Prerequisites +* You must have administrator privileges. + +.Procedure +. In the *Administrator* perspective, navigate to *Administration* -> *Cluster Settings*. +. Select the *Configuration* tab and click the *Console (operator.openshift.io)* resource. +. Click *Actions* -> *Customize* on the right side of the page. +. In the *General* settings, customize the perspective by selecting one of the following options from the dropdown list: +* *Enabled*: Enables the perspective for all users +* *Only visible for privileged users*: Enables the perspective for users who can list all namespaces +* *Only visible for unprivileged users*: Enables the perspective for users who cannot list all namespaces +* *Disabled*: Disables the perspective for all users ++ +A notification opens to confirm that your changes are saved. ++ +image::customizing-user-perspective.png[] ++ +[NOTE] +==== +When you customize the user perspective, your changes are automatically saved and take effect after a browser refresh. +==== diff --git a/modules/odc-customizing-user-perspectives.adoc b/modules/odc-customizing-user-perspectives.adoc new file mode 100644 index 0000000000..ca3ef0f4da --- /dev/null +++ b/modules/odc-customizing-user-perspectives.adoc @@ -0,0 +1,22 @@ +// Module included in the following assembly: +// +// * web_console/customizing-the-web-console.adoc + +:_content-type: CONCEPT +[id="odc-customizing-user-perspectives_{context}"] += Customizing user perspectives + +The {product-title} web console provides two perspectives by default, *Administrator* and *Developer*. You might have more perspectives available depending on installed console plug-ins. As a cluster administrator, you can show or hide a perspective for all users or for a specific user role. Customizing perspectives ensures that users can view only the perspectives that are applicable to their role and tasks. For example, you can hide the *Administrator* perspective from unprivileged users so that they cannot manage cluster resources, users, and projects. Similarly, you can show the *Developer* perspective to users with the developer role so that they can create, deploy, and monitor applications. + +You can also customize the perspective visibility for users based on role-based access control (RBAC). For example, if you customize a perspective for monitoring purposes, which requires specific permissions, you can define that the perspective is visible only to users with required permissions. + +Each perspective includes the following mandatory parameters, which you can edit in the YAML view: + +* `id`: Defines the ID of the perspective to show or hide +* `visibility`: Defines the state of the perspective along with access review checks, if needed +* `state`: Defines whether the perspective is enabled, disabled, or needs an access review check + +[NOTE] +==== +By default, all perspectives are enabled. When you customize the user perspective, your changes are applicable to the entire cluster. +==== diff --git a/web_console/customizing-the-web-console.adoc b/web_console/customizing-the-web-console.adoc index 8f07a3dd70..2386eee0ef 100644 --- a/web_console/customizing-the-web-console.adoc +++ b/web_console/customizing-the-web-console.adoc @@ -26,3 +26,9 @@ include::modules/adding-custom-notification-banners.adoc[leveloffset=+1] include::modules/customizing-cli-downloads.adoc[leveloffset=+1] include::modules/adding-yaml-examples-to-kube-resources.adoc[leveloffset=+1] + +include::modules/odc-customizing-user-perspectives.adoc[leveloffset=+1] + +include::modules/odc-customizing-a-perspective-using-YAML-view.adoc[leveloffset=+2] + +include::modules/odc-customizing-a-perspective-using-form-view.adoc[leveloffset=+2]