Commit 60f5bf716a3c165e3b78c8674f4554fe079d94f0
Committed by
Rafael Manzo
1 parent
7a1cc8e2
[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 :repository_attributes, class_name: 'RepositoryAttributes' |
... | ... | @@ -24,6 +24,6 @@ class User < ActiveRecord::Base |
24 | 24 | protected |
25 | 25 | |
26 | 26 | def password_required? |
27 | - provider.nil? | |
27 | + provider.nil? && super | |
28 | 28 | end |
29 | 29 | end | ... | ... |