GitLab steht wegen Wartungsarbeiten am Montag, den 10. Mai, zwischen 17:00 und 19:00 Uhr nicht zur Verfügung.

Commit bfbe1458 authored by Daniel Gerhardt's avatar Daniel Gerhardt

Forbid changing of the primary e-mail address for CAS users

parent 5fa2e490
......@@ -9,7 +9,7 @@ def show
end
def update
user_params.except!(:email) if @user.ldap_user?
user_params.except!(:email) if @user.ldap_user? || @user.cas_user?
respond_to do |format|
if @user.update_attributes(user_params)
......
......@@ -48,10 +48,10 @@
.form-group
= f.label :email, class: "label-light"
- if @user.ldap_user? && @user.ldap_email?
- if @user.ldap_user? && @user.ldap_email? || @user.cas_user?
= f.text_field :email, class: "form-control", required: true, readonly: true
%span.help-block.light
Your email address was automatically set based on the LDAP server.
Your email address was automatically set and is read-only.
- else
- if @user.temp_oauth_email?
= f.text_field :email, class: "form-control", required: true, value: nil
......
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