blob: d98a44ed3fafbf1ed863a7fa6b5bf5284281dc7d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
class SearchController < ApplicationController
def show
@project = Project.find_by(id: params[:project_id]) if params[:project_id].present?
@group = Group.find_by(id: params[:group_id]) if params[:group_id].present?
if @project
return access_denied! unless can?(current_user, :download_code, @project)
@search_results = Search::ProjectService.new(@project, current_user, params).execute
else
@search_results = Search::GlobalService.new(current_user, params).execute
end
end
end
|