From 8cdd54cc0696b76daa2baf463d02d944b50bac6a Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Thu, 10 Dec 2015 17:29:44 +0100 Subject: Add runners token --- app/controllers/ci/application_controller.rb | 6 ------ app/controllers/ci/projects_controller.rb | 3 +-- 2 files changed, 1 insertion(+), 8 deletions(-) (limited to 'app/controllers/ci') diff --git a/app/controllers/ci/application_controller.rb b/app/controllers/ci/application_controller.rb index bc7f48b3c87..c420b59c3a2 100644 --- a/app/controllers/ci/application_controller.rb +++ b/app/controllers/ci/application_controller.rb @@ -6,12 +6,6 @@ module Ci private - def authenticate_token! - unless project.valid_token?(params[:token]) - return head(403) - end - end - def authorize_access_project! unless can?(current_user, :read_project, project) return page_404 diff --git a/app/controllers/ci/projects_controller.rb b/app/controllers/ci/projects_controller.rb index 7e62320bf21..3004c2d27f0 100644 --- a/app/controllers/ci/projects_controller.rb +++ b/app/controllers/ci/projects_controller.rb @@ -22,8 +22,7 @@ module Ci protected def project - # TODO: what to do here? - @project ||= Project.find_by_ci_id(params[:id]) + @project ||= Project.find_by(ci_id: params[:id].to_i) end def no_cache -- cgit v1.2.1