Bug 1331697

Summary: [userinterface_public_546] Better to omit the 'already exists' pop-up window for resource quota for normal user
Product: OKD Reporter: Xingxing Xia <xxia>
Component: Management ConsoleAssignee: Jakub Hadvig <jhadvig>
Status: CLOSED NOTABUG QA Contact: Yadan Pei <yapei>
Severity: low Docs Contact:
Priority: medium    
Version: 3.xCC: aos-bugs, jhadvig, mmccomas, spadgett
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-05-02 14:45:11 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:

Description Xingxing Xia 2016-04-29 09:52:07 UTC
Description of problem:
For normal user, in From File tab, create existent resource (like quota, limit, pv), it pops up a window saying 'already exists' then prompts 'cannot update'. For normal user, it is better to omit that window directly.

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

How reproducible:
Always

Steps to Reproduce:
1. oc login and create project xxia-proj

2. Via cluster-admin, create resource (which normal user not allowed to create) like quota in the project
oc create -f quota.json --config admin.kubeconfig -n xxia-proj
resourcequota "myquota" created

3. Via normal user, login to Openshift web console, click Add to project --> From File --> Browse, select the quota.json file, upload, then Create. (Use json file to reproduce. Yaml is not recognized right now: https://bugzilla.redhat.com/show_bug.cgi?id=1331665)

Actual results:
3. It pops up a window saying:
resource quota 'myquota' already exists
Do you want to replace with the new content?
                  Replace     Cancel

If click Replace, it shows:
User "xxia" cannot update resourcequotas in project "xxia-proj"

Expected results:
3. It is better to omit that pop-up window and directly prompt:
User "xxia" cannot update resourcequotas in project "xxia-proj"

Additional info:

Comment 1 Samuel Padgett 2016-04-29 12:20:01 UTC
I agree the user experience here could be better.

We have a general problem in the console that we don't know what actions a user has permission for. There's no API currently, so we have to make the request and let it fail, then show the error. We can't make the request without prompting the user first.

We plan to address this for all actions in the web console when a server API is available.

Comment 2 Samuel Padgett 2016-04-29 12:20:20 UTC
I agree the user experience here could be better.

We have a general problem in the console that we don't know what actions a user has permission for. There's no API currently, so we have to make the request and let it fail, then show the error. We can't make the request without prompting the user first.

We plan to address this for all actions in the web console when a server API is available.

Comment 3 Jakub Hadvig 2016-05-02 12:06:32 UTC
@Sam then I think we can close or at least pospone this issue since we have to wait for the server API

Comment 4 Samuel Padgett 2016-05-02 14:45:11 UTC
The following card is for using the what-can-i-do API for disabling actions that a user isn't allowed to perform. We will be able to provide a better experience when we implement that.

https://trello.com/c/UQEUgVrY

This is working as intended (for now), so closing.