lib/conjur/acts_as_role.rb in conjur-api-5.0.0 vs lib/conjur/acts_as_role.rb in conjur-api-5.1.0
- old
+ new
@@ -130,19 +130,17 @@
options["members"] = true
result = JSON.parse(rbac_role_resource[options_querystring options].get)
if result.is_a?(Hash) && ( count = result['count'] )
count
else
- result['members'].collect do |json|
- RoleGrant.parse_from_json(json, credentials)
- end
+ parser_for(:members, credentials, result)
end
end
private
# RestClient::Resource for RBAC role operations.
def rbac_role_resource
- RestClient::Resource.new(Conjur.configuration.core_url, credentials)['roles'][id.to_url_path]
+ url_for(:roles_role, credentials, id)
end
end
end
\ No newline at end of file