src/proxy-ui/app/controllers/clients/services.rb
##
# Returns a sorted list of unique services for which acl can be
# created for.
Returns a sorted list of unique services for which acl can be
created for.
Returns a sorted list of unique services for which acl can be created for .
def acl_services
    authorize!(:view_service_acl)
    validate_params({
      :client_id => [:required]
    })
    client = get_client(params[:client_id])
    services = {}
    client.wsdl.each do |wsdl|
      wsdl.service.each do |service|
        services[service.serviceCode] = {
          :service_code => service.serviceCode,
          :title => service.title
        }
      end
    end
    services_sorted = services.values.sort do |x, y|
      x[:service_code] <=> y[:service_code]
    end
    render_json(services_sorted)
  end
def acl_services authorize! ( :view_service_acl ) validate_params ( { :client_id => [ :required ] } ) client = get_client ( params [ :client_id ] ) services = { } client . wsdl . each do | wsdl | wsdl . service . each do | service | services [ service . serviceCode ] = { :service_code => service . serviceCode , :title => service . title } end end services_sorted = services . values . sort do | x , y | x [ :service_code ] <=> y [ :service_code ] end render_json ( services_sorted ) end
Returns a sorted list of unique services for which acl can be
created for.
Returns a sorted list of unique services for which acl can be created for .