gitlab cancel email verification

System: centos7
gitlab Version: gitlab-ce-11.6.2-ce.0.el7.x86_64
Installation: yum install gitlab-ce-11.6.2 -ce.0.el7.x86_64 -y
requirements: gitlab api python manner with importing large numbers of users need to verify the mailbox is too much trouble, so, remove the new user's e-mail verification, but also cut off extranet, intranet use gitlab.

[root@k8s_gitlab ~]# vim /opt/gitlab/embedded/service/gitlab-rails/app/models/user.rb
devise :lockable, :recoverable, :rememberable, :trackable,
:validatable, :omniauthable, :registerable

vim /opt/gitlab/embedded/service/gitlab-rails/app/controllers/admin/users_controller.rb
def confirm
if user.confirm!
redirect_to :back, notice: "Successfully confirmed"
else
redirect_to :back, alert: "Error occurred. User was not confirmed"
end
end

Deleted! ! ! !

vim /opt/gitlab/embedded/service/gitlab-rails/app/views/admin/users/show.html.haml

  • unless @user.confirmed?
    .panel.panel-info
    .panel-heading
    Confirm user
    .panel-body
    • if @user.unconfirmed_email.present?
      • email = " (#{@user.unconfirmed_email})"
        %p This user has an unconfirmed email address#{email}. You may force a confirmation.
        %br
        = link_to 'Confirm user', confirm_admin_user_path(@user), method: :put, class: "btn btn-info", data: { confirm: 'Are you sure?' }

Delete
hang above three documents

gitlab-ctl restart

Guess you like

Origin blog.51cto.com/3367071/2430146