Commit 7e9e894d authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge branch 'feature/readonly_ldap_email' of /home/git/repositories/gitlab/gitlabhq

parents 44c55307 b2e4664c
......@@ -13,6 +13,8 @@ class ProfilesController < ApplicationController
end
def update
params[:user].delete(:email) if @user.ldap_user?
if @user.update_attributes(params[:user])
flash[:notice] = "Profile was successfully updated"
else
......
......@@ -21,9 +21,15 @@
.controls
= f.text_field :name, class: "input-xlarge", required: true
%span.help-block Enter your name, so people you know can recognize you.
.control-group
= f.label :email, class: "control-label"
.controls
- if @user.ldap_user?
= f.text_field :email, class: "input-xlarge", required: true, readonly: true
%span.help-block.light
Email is read-only for LDAP user
- else
= f.text_field :email, class: "input-xlarge", required: true
- if @user.unconfirmed_email.present?
%span.help-block
......
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