summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-04-13 13:44:56 +0000
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-04-13 13:44:56 +0000
commit6e88d9335b85a62b9054b7e004d78be658c48d23 (patch)
tree0498ca897ca3fb1a740ad51556e76a025414fac9
parent7f04a4174ed4c6627e78c4dabae152fa0f264853 (diff)
parentf2af30f19534c639c17fa5356ab1c18f518f2e98 (diff)
downloadgitlab-ce-6e88d9335b85a62b9054b7e004d78be658c48d23.tar.gz
Merge branch 'skip-email-reconfirmation' into 'master'
Skip email confirmation when set by admin or via LDAP. Addresses private issue https://dev.gitlab.org/gitlab/gitlabhq/issues/2203. See merge request !494
-rw-r--r--CHANGELOG1
-rw-r--r--app/controllers/admin/users_controller.rb2
-rw-r--r--lib/gitlab/ldap/user.rb1
3 files changed, 3 insertions, 1 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 0b7610a76e2..cd936e08a8a 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -79,6 +79,7 @@ v 7.9.3
- Add icons to Add dropdown items.
- Allow admin to create public deploy keys that are accessible to any project.
- Warn when gitlab-shell version doesn't match requirement.
+ - Skip email confirmation when set by admin or via LDAP.
v 7.9.2
diff --git a/app/controllers/admin/users_controller.rb b/app/controllers/admin/users_controller.rb
index 693970e5349..b4c011f213c 100644
--- a/app/controllers/admin/users_controller.rb
+++ b/app/controllers/admin/users_controller.rb
@@ -72,8 +72,8 @@ class Admin::UsersController < Admin::ApplicationController
end
respond_to do |format|
+ user.skip_reconfirmation!
if user.update_attributes(user_params_with_pass)
- user.confirm!
format.html { redirect_to [:admin, user], notice: 'User was successfully updated.' }
format.json { head :ok }
else
diff --git a/lib/gitlab/ldap/user.rb b/lib/gitlab/ldap/user.rb
index b04f5b4ac37..72de7b3a8d6 100644
--- a/lib/gitlab/ldap/user.rb
+++ b/lib/gitlab/ldap/user.rb
@@ -39,6 +39,7 @@ module Gitlab
end
def update_user_attributes
+ gl_user.skip_reconfirmation!
gl_user.email = auth_hash.email
# Build new identity only if we dont have have same one