File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 22
33class ReportPolicy < ApplicationPolicy
44 def show?
5- receiver_available ? && reportable_content? && reports_other_user ?
5+ receiver_configured ? && reportable_content? && reports_another_user ?
66 end
77
88 def create?
9- receiver_available ? && reportable_content? && reports_other_user ?
9+ receiver_configured ? && reportable_content? && reports_another_user ?
1010 end
1111
1212 private
@@ -15,11 +15,11 @@ def reportable_content?
1515 [ RequestForComment , Comment ] . include? ( @record . class )
1616 end
1717
18- def reports_other_user ?
18+ def reports_another_user ?
1919 @record . user != @user
2020 end
2121
22- def receiver_available ?
22+ def receiver_configured ?
2323 CodeOcean ::Config . new ( :code_ocean ) . read . dig ( :content_moderation , :report_emails ) . present?
2424 end
2525end
You can’t perform that action at this time.
0 commit comments