Bug 2036376 - Create VM action should be disabled when user has view only permission
Summary: Create VM action should be disabled when user has view only permission
Keywords:
Status: CLOSED DUPLICATE of bug 2019645
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Console Kubevirt Plugin
Version: 4.10
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Matan Schatzman
QA Contact: Leon Kladnitsky
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-12-31 14:34 UTC by Leon Kladnitsky
Modified: 2022-01-02 18:01 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-01-02 18:01:47 UTC
Target Upstream Version:
Embargoed:
lkladnit: needinfo-
lkladnit: needinfo-


Attachments (Terms of Use)
Enabled menu (48.62 KB, image/png)
2021-12-31 14:34 UTC, Leon Kladnitsky
no flags Details

Description Leon Kladnitsky 2021-12-31 14:34:17 UTC
Created attachment 1848475 [details]
Enabled menu

Description of problem:
"Create" action drop-down on "Virtual Machines" page is enabled for unprivileged user.

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

How reproducible:
100%

Steps to Reproduce:
1. Create a VM in 'default' namespace
2. Give user 'test' view only permission to a namespace 'default': oc adm policy add-role-to-user view test -n default
3. Login to cluster as test and open "Virtual Machines" page.

Actual results:
"Create" action drop-down is enabled and allows to start VM/Template creation wizard

Expected results:
"Create" action drop-down is disabled, according to user permissions

Additional info:

Comment 2 Matan Schatzman 2022-01-02 13:07:57 UTC
Hi @lkladnit , @gouyang ,

I'm guessing this bug is a duplicate of https://bugzilla.redhat.com/show_bug.cgi?id=2019645 just with a different way to handle the situation?


Please consider closing this bug is the solution in https://bugzilla.redhat.com/show_bug.cgi?id=2019645 is ok, it's already merged and can be tested.


Thank you
Matan

Comment 3 Leon Kladnitsky 2022-01-02 18:01:47 UTC
Confirm

*** This bug has been marked as a duplicate of bug 2019645 ***


Note You need to log in before you can comment on or make changes to this bug.