Bug 1258720

Summary: Should show the friendly warning info when viewer deletes the project
Product: OKD Reporter: zhou ying <yinzhou>
Component: Management ConsoleAssignee: Jessica Forrester <jforrest>
Status: CLOSED CURRENTRELEASE QA Contact: Wei Sun <wsun>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.xCC: aos-bugs, mmccomas
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: 2015-09-08 20:14:09 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:

Description zhou ying 2015-09-01 06:02:27 UTC
Description of problem:
When the viewer deletes the project,on web console,there should be friendly warning info,but should not show the restapi info on web console.

Project zhouy1 could not be deleted.{"data":{"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"User  \"zyview\" cannot delete projects in project  \"zhouy1\"","reason":"Forbidden","details":{"name":"zhouy1","kind":"projects"},"code":403},"status":403,"config":{"method":"DELETE","transformRequest":[null],"transformResponse":[null],"url":{"_string":"https://ec2-54-157-169-32.compute-1.amazonaws.com:8443/oapi/v1/projects/zhouy1","_parts":{"protocol":"https","username":null,"password":null,"hostname":"ec2-54-157-169-32.compute-1.amazonaws.com","urn":null,"port":"8443","path":"/oapi/v1/projects/zhouy1","query":null,"fragment":null,"duplicateQueryParameters":false,"escapeQuerySpace":true,"fragmentPrefix":"!"},"_deferred_build":false},"headers":{"Accept":"application/json,  text/plain, */*","Authorization":"Bearer  91OdbxoekxcAiyoQQWudblVH5_F26Y_ytzxaOTrnnkc"}}}

Version-Release number of selected component (if applicable):
openshift v1.0.5-104-gc10dc00
kubernetes v1.1.0-alpha.0-1605-g44c91b1

How reproducible:
always

Steps to Reproduce:
1. Create a project and add view role user to this project.
2. Login web console as viewer, on project list ,choose the project which the user only have view role, click the 'delete' icon.

Actual results:
Show  the restapi info on web console.

Expected results:
Should show the friendly warning info  when viewer deletes the project

Additional info:

Comment 1 zhou ying 2015-09-01 06:17:33 UTC
The same error for the editer deletes the project

Comment 2 Jessica Forrester 2015-09-02 23:22:29 UTC
Fixed as part of https://github.com/openshift/origin/pull/4438

Comment 3 zhou ying 2015-09-06 01:54:18 UTC
Confirmed on fedora_2287:

openshift v1.0.5-216-g547dc07
kubernetes v1.1.0-alpha.0-1605-g44c91b1

Fixed.