Commit 1f0505ee7679d3bb0d18cd7db102e02fc34f7c5c
Committed by
Rafael Manzo
1 parent
1f12b16b
[Colab] Fix password validation for User with OmniAuth provider
Showing
1 changed file
with
2 additions
and
2 deletions
Show diff stats
app/models/user.rb
... | ... | @@ -10,7 +10,7 @@ class User < ActiveRecord::Base |
10 | 10 | validates :provider, presence: true, unless: Proc.new { |user| user.uid.nil? || user.uid.blank? } |
11 | 11 | validates :uid, presence: true, uniqueness: { scope: :provider }, |
12 | 12 | unless: Proc.new { |user| user.provider.nil? || user.provider.blank? } |
13 | - | |
13 | + | |
14 | 14 | has_many :project_attributes, class_name: 'ProjectAttributes' |
15 | 15 | has_many :reading_group_attributes, class_name: 'ReadingGroupAttributes' |
16 | 16 | has_many :kalibro_configuration_attributes, class_name: 'KalibroConfigurationAttributes' |
... | ... | @@ -23,6 +23,6 @@ class User < ActiveRecord::Base |
23 | 23 | protected |
24 | 24 | |
25 | 25 | def password_required? |
26 | - provider.nil? | |
26 | + provider.nil? && super | |
27 | 27 | end |
28 | 28 | end | ... | ... |