diff options
author | Camil Staps <info@camilstaps.nl> | 2019-02-08 15:05:22 +0100 |
---|---|---|
committer | Camil Staps <info@camilstaps.nl> | 2019-08-07 20:49:17 +0200 |
commit | 4f76331ddcfcaf32a868b6e814474fbac6c343eb (patch) | |
tree | e0d9359fac9a7b5df0b3b6de1e19a27e6e2987a6 | |
parent | 73e6ba448db379216f5b703b11295f3751fee16a (diff) | |
download | gitlab-ce-4f76331ddcfcaf32a868b6e814474fbac6c343eb.tar.gz |
Make users.private_profile default false (previously had no default value)
-rw-r--r-- | app/models/user.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/user.rb b/app/models/user.rb index d671c291ec5..cfb8cd3819d 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -284,11 +284,11 @@ class User < ApplicationRecord scope :with_dashboard, -> (dashboard) { where(dashboard: dashboard) } scope :with_visible_profile, -> (user) { if user.nil? - where(private_profile: [false, nil]) + where(private_profile: false) elsif user.admin? all else - where(private_profile: [false, nil]).or where(id: user.id) + where(private_profile: false).or where(id: user.id) end } |