unnecessary checks in assignment/controllers.py

Bug #1414876 reported by wanghong
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Invalid
Undecided
wanghong

Bug Description

There are checks that only one of project/domain or user/group are passed to create/list/check/revoke_grant methods, https://github.com/openstack/keystone/blob/master/keystone/assignment/controllers.py#L496-L504. However,
1. only router calls these methods
2. URL scheme does not accept both project and user simultaneously.
If a user specify a url such as /domains/{domain_id}/projects/{project_id}/users/{user_id}/roles or /domains/{domain_id}/users/{user_id}/groups/{group_id}/roles or etc, he would get a 404 error from router.
That is to say, the cases these methods check would never happen. So, I think these checks can be removed.

wanghong (w-wanghong)
description: updated
Changed in keystone:
assignee: nobody → wanghong (w-wanghong)
Changed in keystone:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on keystone (master)

Change abandoned by wanghong (<email address hidden>) on branch: master
Review: https://review.openstack.org/130722

Revision history for this message
Boris Bobrov (bbobrov) wrote :

Setting to invalid because the patch is abandoned and because of comments in it.

Changed in keystone:
status: In Progress → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.