'Get the roles associated with a user within given project.
This includes roles directly assigned to the user on the
project, as well as those by virtue of group membership or
inheritance.
:returns: a list of role ids.
:raises keystone.exception.ProjectNotFound: If the project doesn\'t
exist.'

@MEMOIZE_COMPUTED_ASSIGNMENTS
def get_roles_for_user_and_project(self, user_id, tenant_id):

    self.resource_api.get_project(tenant_id)
    assignment_list = self.list_role_assignments(user_id=user_id, project_id=tenant_id, effective=True)
    return list(set([x['role_id'] for x in assignment_list]))
