keystone/releasenotes/notes/bug-1754677-13ee75ed1b473f26.yaml
Vishakha Agarwal 28faa24e68 Remove an assignment from domain and project
When you setup a user with a role assignment on a domain
and then a role assignment on a project "acting as a domain",
you can't actually remove them. The database throws you the
error "Multiple rows were found for one()" since it gets two
results for "actor_id" with the same "target_id".

This patch fixes this problem by filtering the database query
by "type" field to determine whether it is a user domain relation
or a user project and then removing the assignment.

Change-Id: Ife92a3c9e0982baafb4224882681c0855f573580
Closes-Bug: #1754677
2020-06-22 14:43:22 +05:30

8 lines
371 B
YAML

---
fixes:
- >
[`bug 1754677 <https://bugs.launchpad.net/keystone/+bug/1754677>`_]
When you setup a user with a role assignment on a domain and then a role
assignment on a project "acting as a domain", you can't actually remove them.
This fixes it by filtering the query by "type" i.e either a USER_DOMAIN or
a USER_PROJECT in role assignment table.