Bug 2019646

Summary: Permission error should pop-up immediately while clicking "Create VM" button on template page for view only user
Product: OpenShift Container Platform Reporter: Guohua Ouyang <gouyang>
Component: Console Kubevirt PluginAssignee: Hilda Stastna <hstastna>
Status: CLOSED ERRATA QA Contact: Guohua Ouyang <gouyang>
Severity: high Docs Contact:
Priority: high    
Version: 4.10CC: aos-bugs, aturgema, gouyang, tnisan
Target Milestone: ---   
Target Release: 4.10.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-03-10 16:24:41 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
create VM button on template page none

Description Guohua Ouyang 2021-11-03 02:38:50 UTC
Created attachment 1839478 [details]
create VM button on template page

Description of problem:
Permission error should pop-up immediately while clicking "Create VM" button on template page for view only user, just like what it's done on "Add source" button.

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

How reproducible:
100%

Steps to Reproduce:
1. login with a view only user
$ oc adm policy add-role-to-user view test -n default
2. on template list page, select a template and click "Create VM" button 
3.

Actual results:
view only user can continue after clicking "Create VM"

Expected results:
Permission error should pop-up immediately while clicking "Create VM" button

Additional info:

Comment 3 Guohua Ouyang 2021-12-06 07:45:53 UTC
This policy is also applied when a project admin user who has edit permission logged in.
Steps:
1. create a nonprivilege user, ref: https://github.com/openshift/console/blob/master/test-prow-e2e.sh#L52
2. login and create a project
3. navigate to template list page
4. click "Create VM"

it pops up the error immediately too, however in this situation, the user has edit permission in their own project which should not popup such error.

Assign the bug back because of the regression problem found.

Comment 4 Guohua Ouyang 2021-12-15 03:18:58 UTC
Set the severity to high as it causes regression problem, project admin cannot use "Create VM" to create vm.

Comment 10 errata-xmlrpc 2022-03-10 16:24:41 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