Gab Social. All are welcome.
This commit is contained in:
17
app/policies/report_note_policy.rb
Normal file
17
app/policies/report_note_policy.rb
Normal file
@@ -0,0 +1,17 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class ReportNotePolicy < ApplicationPolicy
|
||||
def create?
|
||||
staff?
|
||||
end
|
||||
|
||||
def destroy?
|
||||
admin? || owner?
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def owner?
|
||||
record.account_id == current_account&.id
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user