[Refs #263] Remove EasyUrpmi support
This commit is contained in:
parent
0c2d0f4612
commit
39c5da2445
|
@ -1,6 +1,6 @@
|
|||
# -*- encoding : utf-8 -*-
|
||||
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 :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)
|
||||
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
|
||||
@platform = Platform.find params[:id], :include => :repositories
|
||||
#@repositories = @platform.repositories
|
||||
|
|
|
@ -84,7 +84,6 @@ Rosa::Application.routes.draw do
|
|||
end
|
||||
|
||||
collection do
|
||||
get :easy_urpmi
|
||||
get :autocomplete_user_uname
|
||||
end
|
||||
|
||||
|
|
|
@ -49,10 +49,6 @@ describe PlatformsController do
|
|||
end
|
||||
|
||||
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|
|
||||
it "should not be able to perform #{ action } action" do
|
||||
|
|
Loading…
Reference in New Issue