Use User#uses_external_authentication? for checking that

pull/1121/head
Michael Frister 11 years ago
parent 2245c7a7b2
commit 4b868d7062
  1. 2
      app/models/user.rb
  2. 2
      app/views/users/_form.html.erb

@ -356,7 +356,7 @@ class User < Principal
# Does the backend storage allow this user to change their password?
def change_password_allowed?
return false unless identity_url.blank?
return false if uses_external_authentication?
return true if auth_source_id.blank?
return auth_source.allow_password_changes?
end

@ -54,7 +54,7 @@ See doc/COPYRIGHT.rdoc for more details.
<div class="box tabular">
<h3><%=l(:label_authentication)%></h3>
<% if @user.identity_url.present? %>
<% if @user.uses_external_authentication? %>
<%= I18n.t('user.authentication_settings_disabled_due_to_external_authentication') %>
<% else %>
<% unless @auth_sources.empty? %>

Loading…
Cancel
Save