[Refs #263] Remove EasyUrpmi support

This commit is contained in:
Vladimir Sharshov 2012-03-29 23:07:38 +04:00
parent 0c2d0f4612
commit 39c5da2445
3 changed files with 1 additions and 22 deletions

View File

@ -1,6 +1,6 @@
# -*- encoding : utf-8 -*- # -*- encoding : utf-8 -*-
class PlatformsController < ApplicationController class PlatformsController < ApplicationController
before_filter :authenticate_user!, :except => :easy_urpmi before_filter :authenticate_user!
before_filter :find_platform, :only => [:clone, :edit, :destroy, :members] before_filter :find_platform, :only => [:clone, :edit, :destroy, :members]
before_filter :get_paths, :only => [:new, :create, :clone] before_filter :get_paths, :only => [:new, :create, :clone]
@ -17,22 +17,6 @@ class PlatformsController < ApplicationController
@platforms = @platforms.accessible_by(current_ability, :related).paginate(:page => params[:page], :per_page => 20) @platforms = @platforms.accessible_by(current_ability, :related).paginate(:page => params[:page], :per_page => 20)
end end
def easy_urpmi
@platforms = Platform.where(:distrib_type => APP_CONFIG['distr_types'].first, :visibility => 'open', :platform_type => 'main')
respond_to do |format|
format.json do
render :json => {
:platforms => @platforms.map do |p|
{:name => p.name,
:architectures => ['i586', 'x86_64'],
:repositories => p.repositories.map(&:name),
:url => p.public_downloads_url(request.host_with_port)}
end
}
end
end
end
def show def show
@platform = Platform.find params[:id], :include => :repositories @platform = Platform.find params[:id], :include => :repositories
#@repositories = @platform.repositories #@repositories = @platform.repositories

View File

@ -84,7 +84,6 @@ Rosa::Application.routes.draw do
end end
collection do collection do
get :easy_urpmi
get :autocomplete_user_uname get :autocomplete_user_uname
end end

View File

@ -49,10 +49,6 @@ describe PlatformsController do
end end
context 'for guest' do context 'for guest' do
it "should not be able to perform easy_urpmi action" do
get :easy_urpmi
response.should redirect_to(forbidden_path)
end
[:index, :create].each do |action| [:index, :create].each do |action|
it "should not be able to perform #{ action } action" do it "should not be able to perform #{ action } action" do