1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-05 12:46:18 +01:00

RHDEVDOCS-4280: Added a procedure to customize the user perspective

This commit is contained in:
Shipra Singh
2022-10-14 14:51:50 +05:30
committed by openshift-cherrypick-robot
parent 051d39d1d6
commit 5e5a83c218
5 changed files with 136 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

View File

@@ -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*.

View File

@@ -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.
====

View File

@@ -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.
====

View File

@@ -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]