Bug 1011864 - [fork][origin_ui_88]Should give a correct prompt when delete domain with non-owner member
Summary: [fork][origin_ui_88]Should give a correct prompt when delete domain with non-...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: oc
Version: 2.x
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Clayton Coleman
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-09-25 09:24 UTC by Wei Sun
Modified: 2015-05-15 02:25 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-10-17 13:31:11 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Wei Sun 2013-09-25 09:24:39 UTC
Description of problem:
Create a domain which doesn't have any app,and add edit/view/admin role member .Try to delete this domain with edit/view/admin role member,could not delete domain successfully,but prompt "Your domain contains applications. Delete applications first"

Version-Release number of selected component (if applicable):
fork_ami_origin_ui_72_membership_845
rhc 1.15.0 build from fork_ami_origin_ui_72_membership_845

How reproducible:
Always

Steps to Reproduce:
1.Create a domain which doesn't have any app
2.Add edit/view/admin role member to this domain
3.Try to delete this domain with edit/view/admin role member

Actual results:
1.Domain info
OpenShift:~ openshift$ rhc domain show -n wsunmemfor845
Domain wsunmemfor845 (owned by wsun+member)
------------------------------------------------------
  Created:            4:55 PM
  Allowed Gear Sizes: small
  Members:            wsun (admin), wsun+member1 (edit), wsun+member2 (view)
The domain wsunmemfor845 exists but has no applications. You can use 'rhc create-app' to create a new application.

2.OpenShift:~ openshift$ rhc domain-delete wsunmemfor845 -l  wsun+member1
Password: ******
Deleting domain 'wsunmemfor845' ... Your domain contains applications. Delete applications first.

OpenShift:~ openshift$ rhc domain-delete wsunmemfor845 -l  wsun+member2
Password: ******
Deleting domain 'wsunmemfor845' ... Your domain contains applications. Delete applications first.

OpenShift:~ openshift$ rhc domain-delete wsunmemfor845 -l  wsun
Password: ******
Deleting domain 'wsunmemfor845' ... Your domain contains applications. Delete applications first.


Expected results:
Should prompt "You are not permitted to perform this action "

Additional info:

Comment 1 Clayton Coleman 2013-09-25 19:27:32 UTC
Fixed in a1a3026 in membership branch

Comment 2 Wei Sun 2013-09-26 03:00:07 UTC
Verified on fork_ami_origin_ui_72_membership_863

Delete domain with admin/edit/view role member,will prompt "You are not permitted to perform this action (destroy on domain)"

Result:
[wsun@dhcp-8-229 ~]$ rhc domain show -n wsunfork863
Domain wsunfork863 (owned by wsun+member)
----------------------------------------------------
  Created:            10:54 AM
  Allowed Gear Sizes: small
  Members:            wsun (admin), wsun+mem1 (edit), wsun+1 (view)

The domain wsunfork863 exists but has no applications. You can use 'rhc create-app' to create a new application.
[wsun@dhcp-8-229 ~]$ rhc domain-delete wsunfork863 -l wsun -p redhat
Deleting domain 'wsunfork863' ... You are not permitted to perform this action (destroy on domain)
[wsun@dhcp-8-229 ~]$ rhc domain-delete wsunfork863 -l wsun+mem1 -p redhat
Deleting domain 'wsunfork863' ... You are not permitted to perform this action (destroy on domain)
[wsun@dhcp-8-229 ~]$ rhc domain-delete wsunfork863 -l wsun+1 -p redhat
Deleting domain 'wsunfork863' ... You are not permitted to perform this action (destroy on domain)

Comment 3 Wei Sun 2013-09-26 03:16:45 UTC
rhc build from  fork_ami_origin_ui_72_membership_863


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