Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 2019636

Summary: Actions in VM tabs should be disabled when user has view only permission
Product: OpenShift Container Platform Reporter: Guohua Ouyang <gouyang>
Component: Console Kubevirt PluginAssignee: Gilad Lekner <glekner>
Status: CLOSED ERRATA QA Contact: Leon Kladnitsky <lkladnit>
Severity: low Docs Contact:
Priority: medium    
Version: 4.9CC: aos-bugs, glekner, gouyang, lkladnit, tnisan
Target Milestone: ---Keywords: Reopened
Target Release: 4.10.0Flags: lkladnit: needinfo-
lkladnit: needinfo-
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-03-10 16:24:30 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
view only user none

Description Guohua Ouyang 2021-11-03 02:01:40 UTC
Created attachment 1839475 [details]
view only user

Description of problem:
Actions in VM tabs should be disabled when user has view only permission.
1. "Add Network Interface" should be disabled.
2. "Add Disk" should be disabled.
3. "Take snapshot" should be disabled and the "Restore" button should be disabled if there is a snapshot existed.
4. "Select a resource" input dialog should not appears in environment tab and "Save" button is disabled. 

Version-Release number of selected component (if applicable):
4.9.0

How reproducible:
100%

Steps to Reproduce:
1. create a user 'test' and give it view only permission to a namespace 'default'
$ oc adm policy add-role-to-user view test -n default
2. create a vm in 'default'
3. view VM tabs

Actual results:
Acionts are available for view only user

Expected results:
Actions should be disabled or hiden for view only user

Additional info:

Comment 1 Yaacov Zamir 2021-11-08 15:28:34 UTC
Due to complexity, the fix will be tracked in Jira:
https://issues.redhat.com/browse/CNV-14855

Comment 2 Guohua Ouyang 2021-12-06 05:22:51 UTC
It's not fixed by bz2028106.

Comment 4 Leon Kladnitsky 2021-12-31 13:53:09 UTC
>> 4. "Select a resource" input dialog should not appears in environment tab and "Save" button is disabled. 

The "Save" button is disabled, but the "Select a resource" dialog still appears and enabled and the "Serial Number" input is enabled too, is it as requested?

Comment 5 Leon Kladnitsky 2022-01-02 12:44:26 UTC
Verified on 4.10.0-0.ci-2021-12-23-133912

Comment 9 errata-xmlrpc 2022-03-10 16:24:30 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: OpenShift Container Platform 4.10.3 security update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2022:0056