lib/yao/resources/role.rb in yao-0.13.0 vs lib/yao/resources/role.rb in yao-0.13.1

- old
+ new

@@ -35,11 +35,11 @@ # @param on [String] # @return [Array<Yao::Resources::Role>] def list_for_user(user_name, on:) user = Yao::User.get(user_name) tenant = if api_version_v2? - Yao::Tenant.find_by_name(on) + Yao::Tenant.get(on) else Yao::Project.get(on) end res = GET(path_for_role_resource(tenant, user)) @@ -52,11 +52,11 @@ # @return [Faraday::Response] def grant(role_name, to:, on:) role = Yao::Role.get(role_name) user = Yao::User.get(to) tenant = if api_version_v2? - Yao::Tenant.find_by_name(on) + Yao::Tenant.get(on) else Yao::Project.get(on) end # response is "204 Not Content" @@ -69,10 +69,10 @@ # @return [Faraday::Response] def revoke(role_name, from:, on:) role = Yao::Role.get(role_name) user = Yao::User.get(from) tenant = if api_version_v2? - Yao::Tenant.find_by_name(on) + Yao::Tenant.get(on) else Yao::Project.get(on) end # response is "204 Not Content"