Commit 6e88d933 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

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
parents 7f04a417 f2af30f1
...@@ -79,6 +79,7 @@ v 7.9.3 ...@@ -79,6 +79,7 @@ v 7.9.3
- Add icons to Add dropdown items. - Add icons to Add dropdown items.
- Allow admin to create public deploy keys that are accessible to any project. - Allow admin to create public deploy keys that are accessible to any project.
- Warn when gitlab-shell version doesn't match requirement. - Warn when gitlab-shell version doesn't match requirement.
- Skip email confirmation when set by admin or via LDAP.
v 7.9.2 v 7.9.2
......
...@@ -72,8 +72,8 @@ class Admin::UsersController < Admin::ApplicationController ...@@ -72,8 +72,8 @@ class Admin::UsersController < Admin::ApplicationController
end end
respond_to do |format| respond_to do |format|
user.skip_reconfirmation!
if user.update_attributes(user_params_with_pass) if user.update_attributes(user_params_with_pass)
user.confirm!
format.html { redirect_to [:admin, user], notice: 'User was successfully updated.' } format.html { redirect_to [:admin, user], notice: 'User was successfully updated.' }
format.json { head :ok } format.json { head :ok }
else else
......
...@@ -39,6 +39,7 @@ module Gitlab ...@@ -39,6 +39,7 @@ module Gitlab
end end
def update_user_attributes def update_user_attributes
gl_user.skip_reconfirmation!
gl_user.email = auth_hash.email gl_user.email = auth_hash.email
# Build new identity only if we dont have have same one # Build new identity only if we dont have have same one
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment