Commit 4f76331d authored by Camil Staps's avatar Camil Staps

Make users.private_profile default false (previously had no default value)

parent 73e6ba44
...@@ -284,11 +284,11 @@ class User < ApplicationRecord ...@@ -284,11 +284,11 @@ class User < ApplicationRecord
scope :with_dashboard, -> (dashboard) { where(dashboard: dashboard) } scope :with_dashboard, -> (dashboard) { where(dashboard: dashboard) }
scope :with_visible_profile, -> (user) { scope :with_visible_profile, -> (user) {
if user.nil? if user.nil?
where(private_profile: [false, nil]) where(private_profile: false)
elsif user.admin? elsif user.admin?
all all
else else
where(private_profile: [false, nil]).or where(id: user.id) where(private_profile: false).or where(id: user.id)
end end
} }
......
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