rosa-build/app/controllers/api/v1/platforms_controller.rb

14 lines
428 B
Ruby

# -*- encoding : utf-8 -*-
class Api::V1::PlatformsController < Platforms::BaseController
before_filter :authenticate_user!
skip_before_filter :authenticate_user!, :only => [:advisories] if APP_CONFIG['anonymous_access']
load_and_authorize_resource
autocomplete :user, :uname
def index
@platforms = @platforms.accessible_by(current_ability, :related).paginate(:page => params[:page], :per_page => 20)
end
end