20640: Ensure count=none for computed permissions API.
[arvados.git] / services / api / app / controllers / arvados / v1 / computed_permissions_controller.rb
1 # Copyright (C) The Arvados Authors. All rights reserved.
2 #
3 # SPDX-License-Identifier: AGPL-3.0
4
5 class Arvados::V1::ComputedPermissionsController < ApplicationController
6   before_action :admin_required
7
8   def object_list(**args)
9     if !['none', '', nil].include?(params[:count])
10       raise ArgumentError.new("count parameter must be 'none'")
11     end
12     params[:count] = 'none'
13     super
14   end
15 end