diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-05-24 17:12:27 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-05-24 17:12:27 +0300 |
commit | 7cb86eb33550b9e765bea0bfb52705e2b5584802 (patch) | |
tree | 06d4955e360dbcadc04bb5c97111911f797c4c81 /app/views/profiles | |
parent | bd6dfe7d443efc51c3b8502b632ce2e2816424d8 (diff) | |
download | gitlab-ce-7cb86eb33550b9e765bea0bfb52705e2b5584802.tar.gz |
Dont allow LDAP users to change password inside GitLab
Diffstat (limited to 'app/views/profiles')
-rw-r--r-- | app/views/profiles/account.html.haml | 63 |
1 files changed, 32 insertions, 31 deletions
diff --git a/app/views/profiles/account.html.haml b/app/views/profiles/account.html.haml index 16d26c0d8e1..9bba73a080a 100644 --- a/app/views/profiles/account.html.haml +++ b/app/views/profiles/account.html.haml @@ -1,11 +1,35 @@ -- if Gitlab.config.omniauth.enabled - %fieldset - %legend Social Accounts - .oauth_select_holder - %p.hint Tip: Click on icon to activate sigin with one of the following services - - User.omniauth_providers.each do |provider| - %span{class: oauth_active_class(provider) } - = link_to authbutton(provider, 32), omniauth_authorize_path(User, provider) +- unless current_user.ldap_user? + - if Gitlab.config.omniauth.enabled + %fieldset + %legend Social Accounts + .oauth_select_holder + %p.hint Tip: Click on icon to activate sigin with one of the following services + - User.omniauth_providers.each do |provider| + %span{class: oauth_active_class(provider) } + = link_to authbutton(provider, 32), omniauth_authorize_path(User, provider) + + + %fieldset.update-password + %legend Password + = form_for @user, url: update_password_profile_path, method: :put do |f| + .padded + %p.slead After successful password update you will be redirected to login page where you should login with new password + -if @user.errors.any? + .alert.alert-error + %ul + - @user.errors.full_messages.each do |msg| + %li= msg + + .clearfix + = f.label :password + .input= f.password_field :password, required: true + .clearfix + = f.label :password_confirmation + .input + = f.password_field :password_confirmation, required: true + .clearfix + .input + = f.submit 'Save password', class: "btn btn-save" @@ -29,29 +53,6 @@ %span You don`t have one yet. Click generate to fix it. = f.submit 'Generate', class: "btn success btn-build-token" -%fieldset.update-password - %legend Password - = form_for @user, url: update_password_profile_path, method: :put do |f| - .padded - %p.slead After successful password update you will be redirected to login page where you should login with new password - -if @user.errors.any? - .alert.alert-error - %ul - - @user.errors.full_messages.each do |msg| - %li= msg - - .clearfix - = f.label :password - .input= f.password_field :password, required: true - .clearfix - = f.label :password_confirmation - .input - = f.password_field :password_confirmation, required: true - .clearfix - .input - = f.submit 'Save password', class: "btn btn-save" - - - if current_user.can_change_username? %fieldset.update-username |