diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-10-01 12:34:32 +0200 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-10-01 12:34:32 +0200 |
commit | 41b08e4a08b8caf445d2b7b59e2e76b73ab88a7b (patch) | |
tree | 88ea356912fba42d64efc8047c44369b4c84f8f3 /app/controllers | |
parent | fc4f5eef99c53dee266cb416615fc17644a1c218 (diff) | |
parent | 8e05ee36f72813aa46d76594c17f3f8cdb0a12ed (diff) | |
download | gitlab-ce-41b08e4a08b8caf445d2b7b59e2e76b73ab88a7b.tar.gz |
Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/ci/admin/runners_controller.rb | 5 | ||||
-rw-r--r-- | app/controllers/passwords_controller.rb | 21 | ||||
-rw-r--r-- | app/controllers/projects/merge_requests_controller.rb | 1 |
3 files changed, 5 insertions, 22 deletions
diff --git a/app/controllers/ci/admin/runners_controller.rb b/app/controllers/ci/admin/runners_controller.rb index dc3508b49dd..9a68add9083 100644 --- a/app/controllers/ci/admin/runners_controller.rb +++ b/app/controllers/ci/admin/runners_controller.rb @@ -12,7 +12,10 @@ module Ci def show @builds = @runner.builds.order('id DESC').first(30) @projects = Ci::Project.all - @projects = @projects.search(params[:search]) if params[:search].present? + if params[:search].present? + @gl_projects = ::Project.search(params[:search]) + @projects = @projects.where(gitlab_id: @gl_projects.select(:id)) + end @projects = @projects.where("ci_projects.id NOT IN (?)", @runner.projects.pluck(:id)) if @runner.projects.any? @projects = @projects.page(params[:page]).per(30) end diff --git a/app/controllers/passwords_controller.rb b/app/controllers/passwords_controller.rb index 8450ba31021..edf43935f3c 100644 --- a/app/controllers/passwords_controller.rb +++ b/app/controllers/passwords_controller.rb @@ -16,27 +16,6 @@ class PasswordsController < Devise::PasswordsController end end - # After a user resets their password, prompt for 2FA code if enabled instead - # of signing in automatically - # - # See http://git.io/vURrI - def update - super do |resource| - # TODO (rspeicher): In Devise master (> 3.4.1), we can set - # `Devise.sign_in_after_reset_password = false` and avoid this mess. - if resource.errors.empty? && resource.try(:two_factor_enabled?) - resource.unlock_access! if unlockable?(resource) - - # Since we are not signing this user in, we use the :updated_not_active - # message which only contains "Your password was changed successfully." - set_flash_message(:notice, :updated_not_active) if is_flashing_format? - - # Redirect to sign in so they can enter 2FA code - respond_with(resource, location: new_session_path(resource)) and return - end - end - end - def edit super reset_password_token = Devise.token_generator.digest( diff --git a/app/controllers/projects/merge_requests_controller.rb b/app/controllers/projects/merge_requests_controller.rb index 7574842cd43..7570934e727 100644 --- a/app/controllers/projects/merge_requests_controller.rb +++ b/app/controllers/projects/merge_requests_controller.rb @@ -150,6 +150,7 @@ class Projects::MergeRequestsController < Projects::ApplicationController return access_denied! unless @merge_request.can_be_merged_by?(current_user) if @merge_request.mergeable? + @merge_request.update(merge_error: nil) MergeWorker.perform_async(@merge_request.id, current_user.id, params) @status = true else |