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

Bug 1226655

Summary: oVirt user portal: New VM option should be grayed out when using user without VmCreator user role.
Product: [oVirt] ovirt-engine Reporter: Nisim Simsolo <nsimsolo>
Component: Frontend.UserPortalAssignee: bugs <bugs>
Status: CLOSED UPSTREAM QA Contact: Pavel Stehlik <pstehlik>
Severity: medium Docs Contact:
Priority: unspecified    
Version: ---CC: bugs, istein, lsurette, michal.skrivanek, nsimsolo, rbalakri, srevivo, tjelinek, ykaul
Target Milestone: ovirt-4.2.0Flags: tjelinek: ovirt-4.2?
ylavi: planning_ack?
ylavi: devel_ack?
ylavi: testing_ack?
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-07-18 09:06:13 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Virt RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1221694    
Bug Blocks:    
Attachments:
Description Flags
UI screenshot none

Description Nisim Simsolo 2015-05-31 13:33:32 UTC
Description of problem:
When logging in to user portal using a user with only "UserRole" permission assigned to it, the option to click on "new VM" is available.
Opening new VM dialogue shows incorrect error message:
"Not available when no Data Center is up"
Also, all the fields in this dialogue are grayed out.

Screenshot attached.

Version-Release number of selected component (if applicable):
oVirt Engine Version: 3.6.0-0.0.master.20150519172219.git9a2e2b3.el6

How reproducible:
constantly

Steps to Reproduce:
1. Add active directory domain and restart ovirt-engine service.
2. Navigate to "Users" tab and add active directory user.
3. Navigate to configure > system permissions and add active directory user with role to asign: "UserRole"
4. open user poratal with active directory user.
5. Click on "New VM".

Actual results:
new VM dialogue opened and an incorrect error message appears: 
"Not available when no Data Center is up"

Expected results:
"new VM" dialogue should be unavailable (grayed out) when using user without permissions to create VM. 

Additional info:
Screenshot attached.

Comment 1 Nisim Simsolo 2015-05-31 13:36:49 UTC
Created attachment 1032863 [details]
UI screenshot

Comment 2 Einav Cohen 2015-06-02 14:24:39 UTC
is the request here to grey out the dialog, or the action-button?

if the dialog: the dialog is already greyed out, as seen in the screen-shot. 
the message can be phrased better. something like: "Not available when no Data-Center is up or when there are insufficient permissions to perform the action". 

if the action-button: this BZ should depend on bug 1221694 - it doesn't make sense to apply the greying-out behaviour only to the New VM action - it should be applied across all of the UI (web-admin, user-portal) for all actions on all objects.

Comment 3 Nisim Simsolo 2015-06-02 14:39:57 UTC
The error message was incorrect, there was a data center up as you can see in the screenshot one of the VMs is up. thus the bug i opened.
Either way, depending this bug on bug 1221694 make sense, the "New VM" button should be grayed out when user role does not have these permissions.

Comment 4 Michal Skrivanek 2015-07-22 11:51:33 UTC
moved off to 4.0 per scrub mtg

Comment 5 Red Hat Bugzilla Rules Engine 2015-10-19 11:02:46 UTC
Target release should be placed once a package build is known to fix a issue. Since this bug is not modified, the target version has been reset. Please use target milestone to plan a fix for a oVirt release.

Comment 6 Michal Skrivanek 2016-04-22 14:45:41 UTC
pushed out due to capacity reasons

Comment 7 Tomas Jelinek 2016-12-13 09:02:10 UTC
This may be addressed in a new user portal but will not fit into 4.1 - pushing to 4.2.

Comment 8 Tomas Jelinek 2017-07-18 09:06:13 UTC
tracking upstream: https://github.com/oVirt/ovirt-web-ui/issues/286