Bug 2019647

Summary: "Remove favorite" and "Create new Template" should be disabled in template action list for view only user
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.10CC: aos-bugs, glekner, gouyang, lkladnit, tnisan
Target Milestone: ---Keywords: Reopened
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
template action list for view only user none

Description Guohua Ouyang 2021-11-03 02:43:42 UTC
Created attachment 1839479 [details]
template action list for view only user

Description of problem:
"Remove favorite" and "Create new Template" should be disabled in template action list for view only user

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

How reproducible:
100%

Steps to Reproduce:
1. login with a view only user 'test' to namepsace 'default'
$ oc adm policy add-role-to-user view test -n default
2. go to template list page and check template action list

Actual results:
"Remove favorite" and "Create new Template" is enabled

Expected results:
"Remove favorite" and "Create new Template" is disabled.

Additional info:

Comment 1 Guohua Ouyang 2021-11-03 02:45:12 UTC
"Remove favorite" is only in kebab button list, the detail action list don't see it.

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

Comment 3 Guohua Ouyang 2021-12-06 05:23:57 UTC
Reopen this as it's not fixed by bz2028106

Comment 4 Gilad Lekner 2021-12-20 11:29:40 UTC
In latest master non-admin user cannot list templates even after giving access to view default.

datasources.cdi.kubevirt.io is forbidden: User "test" cannot list resource "datasources" in API group "cdi.kubevirt.io" at the cluster scope

Comment 5 Guohua Ouyang 2021-12-20 13:47:32 UTC
(In reply to Gilad Lekner from comment #4)
> In latest master non-admin user cannot list templates even after giving
> access to view default.
> 
> datasources.cdi.kubevirt.io is forbidden: User "test" cannot list resource
> "datasources" in API group "cdi.kubevirt.io" at the cluster scope

It's bug #2034243 - regular user cant load template list

Comment 7 Leon Kladnitsky 2022-01-03 20:24:12 UTC
Verified on 4.10.0-0.ci-2022-01-03-042630

Comment 11 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