summaryrefslogtreecommitdiff
path: root/app/models/user.rb
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzegorz.bizon@ntsn.pl>2015-12-14 11:46:02 +0100
committerGrzegorz Bizon <grzegorz.bizon@ntsn.pl>2015-12-14 12:26:40 +0100
commit2ec93abed7a1a3aa49b3267342824e0743de0f54 (patch)
tree7d3381dd4bd1f4d73ba234a56742edf491baa515 /app/models/user.rb
parentbc1cfd384f4f972ad887b0501280b9f94d4c94ac (diff)
parentc81023435795766411c5954a4676ebb215af40a6 (diff)
downloadgitlab-ce-2ec93abed7a1a3aa49b3267342824e0743de0f54.tar.gz
Merge branch 'master' into ci/persist-registration-token
* master: (66 commits) Fix runners admin view Fix migrations Rename mention of gitlab-git-http-server to gitlab-workhorse Bump Redis requirement to 2.8 for Sidekiq 4 requirements Fix wording on runner setup page add details on how to change saml button label Fix tests Move awards back to gray panel and few improvements to sidebar Few UI improvements to new sidebar implementation Fix tests for new issuable sidebar Update changelog Implement new sidebar for merge request page Make edit link on issuable sidebar works Redesign issue page for new sidebar Move awards css to separate file Implement issuable sidebar partial Update CHANGELOG Clarify cache behavior Run builds from projects with enabled CI Use Gitlab::Git instead of Ci::Git ... Conflicts: db/schema.rb
Diffstat (limited to 'app/models/user.rb')
-rw-r--r--app/models/user.rb7
1 files changed, 3 insertions, 4 deletions
diff --git a/app/models/user.rb b/app/models/user.rb
index 1a8d8f1e249..fdd14f4571d 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -136,7 +136,7 @@ class User < ActiveRecord::Base
has_many :assigned_merge_requests, dependent: :destroy, foreign_key: :assignee_id, class_name: "MergeRequest"
has_many :oauth_applications, class_name: 'Doorkeeper::Application', as: :owner, dependent: :destroy
has_one :abuse_report, dependent: :destroy
- has_many :ci_builds, dependent: :nullify, class_name: 'Ci::Build'
+ has_many :builds, dependent: :nullify, class_name: 'Ci::Build'
#
@@ -771,10 +771,9 @@ class User < ActiveRecord::Base
def ci_authorized_runners
@ci_authorized_runners ||= begin
- runner_ids = Ci::RunnerProject.joins(:project).
- where("ci_projects.gitlab_id IN (#{ci_projects_union.to_sql})").
+ runner_ids = Ci::RunnerProject.
+ where("ci_runner_projects.gl_project_id IN (#{ci_projects_union.to_sql})").
select(:runner_id)
-
Ci::Runner.specific.where(id: runner_ids)
end
end