Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
7e9e894d
Commit
7e9e894d
authored
Nov 27, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/readonly_ldap_email' of /home/git/repositories/gitlab/gitlabhq
parents
44c55307
b2e4664c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
6 deletions
+14
-6
app/controllers/profiles_controller.rb
app/controllers/profiles_controller.rb
+2
-0
app/views/profiles/show.html.haml
app/views/profiles/show.html.haml
+12
-6
No files found.
app/controllers/profiles_controller.rb
View file @
7e9e894d
...
...
@@ -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
...
...
app/views/profiles/show.html.haml
View file @
7e9e894d
...
...
@@ -21,16 +21,22 @@
.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
=
f
.
text_field
:email
,
class:
"input-xlarge"
,
required:
true
-
if
@user
.
unconfirmed_email
.
present?
%span
.help-block
We sent confirmation email to
%strong
#{
@user
.
unconfirmed_email
}
-
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
%span
.help-block
We also use email for avatar detection if no avatar is uploaded.
=
f
.
text_field
:email
,
class:
"input-xlarge"
,
required:
true
-
if
@user
.
unconfirmed_email
.
present?
%span
.help-block
We sent confirmation email to
%strong
#{
@user
.
unconfirmed_email
}
-
else
%span
.help-block
We also use email for avatar detection if no avatar is uploaded.
.control-group
=
f
.
label
:skype
,
class:
"control-label"
.controls
=
f
.
text_field
:skype
,
class:
"input-xlarge"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment