summaryrefslogtreecommitdiff
path: root/app/controllers/ci
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2015-12-10 17:29:44 +0100
committerKamil Trzcinski <ayufan@ayufan.eu>2015-12-11 18:02:09 +0100
commit8cdd54cc0696b76daa2baf463d02d944b50bac6a (patch)
treeeb3e5c1aeef92181b49217c965685e5b9ba67c74 /app/controllers/ci
parente80e3f5372d6bcad1fbe04a85b3086bb66794828 (diff)
downloadgitlab-ce-8cdd54cc0696b76daa2baf463d02d944b50bac6a.tar.gz
Add runners token
Diffstat (limited to 'app/controllers/ci')
-rw-r--r--app/controllers/ci/application_controller.rb6
-rw-r--r--app/controllers/ci/projects_controller.rb3
2 files changed, 1 insertions, 8 deletions
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