#465: cleanup
This commit is contained in:
parent
ba219d6f1d
commit
86bfd9b8c7
|
@ -5,7 +5,6 @@ class Projects::Git::BaseController < Projects::BaseController
|
||||||
before_action :authenticate_user, only: %i(show index blame raw archive diff tags branches)
|
before_action :authenticate_user, only: %i(show index blame raw archive diff tags branches)
|
||||||
end
|
end
|
||||||
|
|
||||||
# load_and_authorize_resource :project
|
|
||||||
before_action :set_treeish_and_path
|
before_action :set_treeish_and_path
|
||||||
before_action :set_branch_and_tree
|
before_action :set_branch_and_tree
|
||||||
|
|
||||||
|
|
|
@ -2,12 +2,11 @@ class SearchController < ApplicationController
|
||||||
include PaginateHelper
|
include PaginateHelper
|
||||||
|
|
||||||
before_action :authenticate_user! unless APP_CONFIG['anonymous_access']
|
before_action :authenticate_user! unless APP_CONFIG['anonymous_access']
|
||||||
# load_and_authorize_resource
|
|
||||||
|
|
||||||
def index
|
def index
|
||||||
@type = Search::TYPES.find{ |t| t == params[:type] } || Search::TYPES.first
|
@type = Search::TYPES.find{ |t| t == params[:type] } || Search::TYPES.first
|
||||||
@query = params[:query]
|
@query = params[:query]
|
||||||
@search = Search.new(@query, current_ability, paginate_params)
|
@search = Search.new(@query, current_user, paginate_params)
|
||||||
@collection = @search.send(@type)
|
@collection = @search.send(@type)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue