Bug 1016432

Summary: Should not change domain name with admin role but not doamin owner
Product: OpenShift Online Reporter: Wei Sun <wsun>
Component: ocAssignee: Jordan Liggitt <jliggitt>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.xCC: jliggitt
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: 2013-10-17 13:33:57 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 Wei Sun 2013-10-08 07:36:15 UTC
Description of problem:
Create a domain and add admin role member to this domain,and try to update the domain name with admin role but not domain owner,but could update the domain name successfully.

But check members help doc on website,there is some help info :
Administer – Everything except change allowed gear sizes and the domain name

So for non-owner admin role member,should not change domain name successfully.

Version-Release number of selected component (if applicable):
INT(devenv-stage_488)
rhc 1.15.6

How reproducible:
Always

Steps to Reproduce:
1.Create a domain
2.Add admin role member to this domain
3.Update the domain name with admin role member but not domain owner
4.Check domain name

Actual results:
2.rhc add-member wjiang -r admin -n wsun3int -l wsun+3 -p xxxxxx
Adding 1 administrator to domain ... done

3.rhc domain-rename wsun3int int3wsun -l wjiang -p xxxxxx
Renaming domain 'wsun3int' to 'int3wsun' ... done

4.rhc domain show -l wsun+3 
Password: ******

Domain int3wsun (owned by wsun+3)

Expected results:
Should not change domain name with admin role member

Additional info:

Comment 2 openshift-github-bot 2013-10-08 18:07:22 UTC
Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/f7b4a57999e4c39ebcfe6c6299c8ddc42a5ad1e2
Fix bug 1016432 - restrict domain rename to owner

Comment 3 Wei Sun 2013-10-09 10:55:42 UTC
Will verify this bug after  codes are merged.

Comment 4 Wei Sun 2013-10-10 02:43:39 UTC
Verified on devenv_stage_491 and devenv_3879,client version is rhc-1.15.6

Result:
[wsun@dhcp-8-229 ~]$ rhc domain show
Domain wsundevstg491 (owned by wsun)
-----------------------------------------------
  Created:            10:29 AM
  Allowed Gear Sizes: small
  Members:            yujzhang (admin)


[wsun@dhcp-8-229 ~]$ rhc domain-rename wsundevstg491 wsunstg491 -l yujzhang -p x
Renaming domain 'wsundevstg491' to 'wsunstg491' ... You are not permitted to perform this action (change_namespace on domain)