Bug 1011669 - New applications do not inherit correct member roles from domain
New applications do not inherit correct member roles from domain
Status: CLOSED CURRENTRELEASE
Product: OpenShift Online
Classification: Red Hat
Component: Kubernetes (Show other bugs)
2.x
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Clayton Coleman
libra bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-09-24 15:03 EDT by Jordan Liggitt
Modified: 2015-05-14 20:21 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-10-17 09:31:05 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jordan Liggitt 2013-09-24 15:03:23 EDT
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
Comment 1 Jordan Liggitt 2013-09-24 15:20:50 EDT
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.
Comment 2 Clayton Coleman 2013-09-25 16:06:01 EDT
Fixed, 0a05e70607b030c68ea33c251bd228f68ee7952d meant that items weren't correctly cloned, and m.role was not pulling the role from the user.
Comment 3 weiwei jiang 2013-09-26 03:50:49 EDT
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@redhat.com 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@redhat.com admin (owner)
yujzhang              view
# rhc member list -t wjiang926
Login                 Role
--------------------- -------------
wjiang+926@redhat.com admin (owner)
yujzhang              view

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