Skip to content

[#57077] Admin only User Custom field is visible to non-admin users #13703

[#57077] Admin only User Custom field is visible to non-admin users

[#57077] Admin only User Custom field is visible to non-admin users #13703

GitHub Actions / rubocop succeeded Aug 12, 2024 in 0s

reviewdog [rubocop] report

reported by reviewdog 🐶

Findings (0)
Filtered Findings (60)

app/models/user.rb|70 col 3| Specify a :dependent option.
app/models/user.rb|70 col 3| Specify an :inverse_of option.
app/models/user.rb|75 col 3| Specify a :dependent option.
app/models/user.rb|111 col 35| Do not use Time.now without zone. Use one of Time.zone.now, Time.current, Time.now.in_time_zone, Time.now.utc, Time.now.getlocal, Time.now.xmlschema, Time.now.iso8601, Time.now.jisx0301, Time.now.rfc3339, Time.now.httpdate, Time.now.to_i, Time.now.to_f instead.
app/models/user.rb|242 col 15| Use find_by instead of dynamic find_by_plaintext_value.
app/models/user.rb|299 col 5| Duplicate branch body detected.
app/models/user.rb|399 col 43| Do not use Time.now without zone. Use one of Time.zone.now, Time.current, Time.now.in_time_zone, Time.now.utc, Time.now.getlocal, Time.now.xmlschema, Time.now.iso8601, Time.now.jisx0301, Time.now.rfc3339, Time.now.httpdate, Time.now.to_i, Time.now.to_f instead.
app/models/user.rb|427 col 13| Use find_by instead of dynamic find_by_plaintext_value.
app/models/user.rb|471 col 12| Do not use Date.today without zone. Use Time.zone.today instead.
app/models/user.rb|608 col 3| private (on line 606) does not make singleton methods private. Use private_class_method or private inside a class << self block instead.
app/models/user.rb|629 col 15| Prefer [keep_count..] over [keep_count..-1].
app/models/user.rb|639 col 3| private (on line 606) does not make singleton methods private. Use private_class_method or private inside a class << self block instead.
app/models/user.rb|647 col 3| private (on line 606) does not make singleton methods private. Use private_class_method or private inside a class << self block instead.
app/models/user.rb|653 col 3| private (on line 606) does not make singleton methods private. Use private_class_method or private inside a class << self block instead.
app/models/user.rb|657 col 3| private (on line 606) does not make singleton methods private. Use private_class_method or private inside a class << self block instead.
app/models/user.rb|673 col 12| Do not use Time.now without zone. Use one of Time.zone.now, Time.current, Time.now.in_time_zone, Time.now.utc, Time.now.getlocal, Time.now.xmlschema, Time.now.iso8601, Time.now.jisx0301, Time.now.rfc3339, Time.now.httpdate, Time.now.to_i, Time.now.to_f instead.
app/models/user.rb|685 col 38| Do not use Time.now without zone. Use one of Time.zone.now, Time.current, Time.now.in_time_zone, Time.now.utc, Time.now.getlocal, Time.now.xmlschema, Time.now.iso8601, Time.now.jisx0301, Time.now.rfc3339, Time.now.httpdate, Time.now.to_i, Time.now.to_f instead.
app/models/user.rb|688 col 3| private (on line 606) does not make singleton methods private. Use private_class_method or private inside a class << self block instead.
app/models/user.rb|689 col 98| Unnecessary disabling of Rails/DynamicFindBy.
spec/models/principals/scopes/ordered_by_name_spec.rb|49 col 15| Context description should match /^and\b/, /^as\b/, /^even\b/, /^for\b/, /^given\b/, /^having\b/, /^if\b/, /^in\b/, /^on\b/, /^to\b/, /^unless\b/, /^via\b/, /^when\b/, /^with\b/, /^within\b/, or /^without\b/.
spec/models/user_spec.rb|102 col 22| Use expect(...).not_to be_valid.
spec/models/user_spec.rb|111 col 22| Use expect(...).not_to be_valid.
spec/models/user_spec.rb|224 col 16| Use find_by instead of dynamic find_by_unique.
spec/models/user_spec.rb|387 col 7| Use receive_messages instead of multiple stubs on lines [388].
spec/models/user_spec.rb|388 col 7| Use receive_messages instead of multiple stubs on lines [387].
spec/models/user_spec.rb|521 col 21| Prefer using verifying doubles over normal doubles.
spec/models/user_spec.rb|522 col 7| Use receive_messages instead of multiple stubs on lines [523, 524, 525].
spec/models/user_spec.rb|523 col 7| Use receive_messages instead of multiple stubs on lines [522, 524, 525].
spec/models/user_spec.rb|524 col 7| Use receive_messages instead of multiple stubs on lines [522, 523, 525].
spec/models/user_spec.rb|525 col 7| Use receive_messages instead of multiple stubs on lines [522, 523, 524].
spec/models/user_spec.rb|528 col 7| Prefer allow over expect when configuring a response.
spec/models/user_spec.rb|528 col 30| Prefer have_received for setting message expectations. Setup user_double as a spy using allow or instance_spy.
spec/models/user_spec.rb|559 col 11| Do not use expect in before hook
spec/models/user_spec.rb|559 col 11| Prefer allow over expect when configuring a response.
spec/models/user_spec.rb|559 col 34| Prefer have_received for setting message expectations. Setup auth_source as a spy using allow or instance_spy.
spec/models/user_spec.rb|570 col 11| Do not use expect in before hook
spec/models/user_spec.rb|570 col 11| Prefer allow over expect when configuring a response.
spec/models/user_spec.rb|570 col 34| Prefer have_received for setting message expectations. Setup auth_source as a spy using allow or instance_spy.
spec/models/user_spec.rb|659 col 13| Context description should match /^and\b/, /^as\b/, /^even\b/, /^for\b/, /^given\b/, /^having\b/, /^if\b/, /^in\b/, /^on\b/, /^to\b/, /^unless\b/, /^via\b/, /^when\b/, /^with\b/, /^within\b/, or /^without\b/.
spec/models/user_spec.rb|673 col 13| Context description should match /^and\b/, /^as\b/, /^even\b/, /^for\b/, /^given\b/, /^having\b/, /^if\b/, /^in\b/, /^on\b/, /^to\b/, /^unless\b/, /^via\b/, /^when\b/, /^with\b/, /^within\b/, or /^without\b/.
spec/models/user_spec.rb|676 col 9| Do not use expect in before hook
spec/models/user_spec.rb|676 col 40| Avoid instance variables - use let, a method call, or a local variable (if possible).
spec/models/user_spec.rb|682 col 37| Avoid instance variables - use let, a method call, or a local variable (if possible).
spec/models/user_spec.rb|697 col 13| Context description should match /^and\b/, /^as\b/, /^even\b/, /^for\b/, /^given\b/, /^having\b/, /^if\b/, /^in\b/, /^on\b/, /^to\b/, /^unless\b/, /^via\b/, /^when\b/, /^with\b/, /^within\b/, or /^without\b/.
spec/models/user_spec.rb|705 col 13| Context description should match /^and\b/, /^as\b/, /^even\b/, /^for\b/, /^given\b/, /^having\b/, /^if\b/, /^in\b/, /^on\b/, /^to\b/, /^unless\b/, /^via\b/, /^when\b/, /^with\b/, /^within\b/, or /^without\b/.
spec/models/user_spec.rb|715 col 13| Context description should match /^and\b/, /^as\b/, /^even\b/, /^for\b/, /^given\b/, /^having\b/, /^if\b/, /^in\b/, /^on\b/, /^to\b/, /^unless\b/, /^via\b/, /^when\b/, /^with\b/, /^within\b/, or /^without\b/.
spec/models/user_spec.rb|724 col 13| Context description should match /^and\b/, /^as\b/, /^even\b/, /^for\b/, /^given\b/, /^having\b/, /^if\b/, /^in\b/, /^on\b/, /^to\b/, /^unless\b/, /^via\b/, /^when\b/, /^with\b/, /^within\b/, or /^without\b/.
spec/models/user_spec.rb|737 col 13| Context description should match /^and\b/, /^as\b/, /^even\b/, /^for\b/, /^given\b/, /^having\b/, /^if\b/, /^in\b/, /^on\b/, /^to\b/, /^unless\b/, /^via\b/, /^when\b/, /^with\b/, /^within\b/, or /^without\b/.
spec/models/user_spec.rb|742 col 19| Use find_by instead of dynamic find_by_rss_key.
spec/models/user_spec.rb|745 col 13| Context description should match /^and\b/, /^as\b/, /^even\b/, /^for\b/, /^given\b/, /^having\b/, /^if\b/, /^in\b/, /^on\b/, /^to\b/, /^unless\b/, /^via\b/, /^when\b/, /^with\b/, /^within\b/, or /^without\b/.
spec/models/user_spec.rb|750 col 19| Use find_by instead of dynamic find_by_rss_key.
spec/models/user_spec.rb|836 col 18| Use find_by instead of dynamic find_by_mail.
spec/models/user_spec.rb|851 col 18| Use find_by instead of dynamic find_by_mail.
spec/models/user_spec.rb|855 col 18| Use find_by instead of dynamic find_by_mail.
spec/models/user_spec.rb|942 col 16| Use find_by instead of dynamic find_by_api_key.
spec/models/user_spec.rb|949 col 16| Use find_by instead of dynamic find_by_api_key.
spec/models/user_spec.rb|958 col 16| Use find_by instead of dynamic find_by_api_key.
spec/models/user_spec.rb|977 col 16| Use find_by instead of dynamic find_by_mail.
spec/models/user_spec.rb|984 col 16| Use find_by instead of dynamic find_by_mail.
spec/models/user_spec.rb|993 col 16| Use find_by instead of dynamic find_by_mail.