← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1170649] Re: Removing a user from a project would result to all members of that project to be removed

 

** Changed in: keystone/grizzly
       Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Keystone.
https://bugs.launchpad.net/bugs/1170649

Title:
  Removing a user from a project would result to all members of that
  project to be removed

Status in OpenStack Identity (Keystone):
  Fix Committed
Status in Keystone grizzly series:
  Fix Released

Bug description:
  Given a project with multiple users with a role in that project. Then
  I choose 1 user from that project, and then I remove ALL roles of that
  user from the project. This action kicks out all the users from that
  project.

  Based on mysql logs. Removing the role of the user executes this command:
  DELETE FROM user_project_metadata WHERE user_project_metadata.project_id = '430713609fad4216a3b72cf080eba006';

  Patch for this bug:

  --- a/keystone/identity/backends/sql.py
  +++ b/keystone/identity/backends/sql.py
  @@ -435,6 +435,7 @@ class Identity(sql.Base, identity.Driver):
                   session = self.get_session()
                   q = session.query(UserProjectGrant)
                   q = q.filter_by(project_id=tenant_id)
  +                q = q.filter_by(user_id=user_id)
                   q.delete()

To manage notifications about this bug go to:
https://bugs.launchpad.net/keystone/+bug/1170649/+subscriptions