'Used for adding a user to a tenant.
In the legacy data model adding a user to a tenant required setting
a role.'

@controller.v2_deprecated
def create_role_ref(self, request, user_id, role):

    self.assert_admin(request)
    tenant_id = role.get('tenantId')
    role_id = role.get('roleId')
    self.assignment_api.add_role_to_user_and_project(user_id, tenant_id, role_id)
    role_ref = self.role_api.get_role(role_id)
    return {'role': role_ref}
