Hide Forgot
Description of problem: When new applications are created within a domain, the domain members are all assigned the admin role in the application Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: 1. Create a domain 2. Add other members to the domain with view, edit, and admin roles 3. Create an application within the domain 4. View the application member info Actual results: All members have admin role within the application Expected results: Members have identical roles to the domain Additional info: Editing the members of the domain once the application is created propagates to the app correctly
Caused by this line: p.inherit_membership.each{ |m| m.clear.add_grant(m.role || default_role, parent.name) } if p The member is always cleared (which removed the member's role), so the default role is always used.
Fixed, 0a05e70607b030c68ea33c251bd228f68ee7952d meant that items weren't correctly cloned, and m.role was not pulling the role from the user.
Tested on fork_ami_origin_ui_72_membership_863 via rhc build from it, and found this issue is fixed, so verify this issue, thx # rhc app create app php-5.3 --no-git --no-dns Application Options ------------------- Domain: wjiang926 Cartridges: php-5.3 Gear Size: default Scaling: no Creating application 'app' ... done # rhc member add yujzhang -n wjiang926 --role view Adding 1 viewer to domain ... done # rhc member list -t wjiang926/app Login Role --------------------- ------------- wjiang+926 admin (owner) yujzhang view # rhc app create app2 php-5.3 --no-git --no-dns Application Options ------------------- Domain: wjiang926 Cartridges: php-5.3 Gear Size: default Scaling: no Creating application 'app2' ... done # rhc member list -t wjiang926/app Login Role --------------------- ------------- wjiang+926 admin (owner) yujzhang view # rhc member list -t wjiang926 Login Role --------------------- ------------- wjiang+926 admin (owner) yujzhang view