Merge remote-tracking branch 'tootsuite/master' into glitchsoc/master
This commit is contained in:
@@ -29,6 +29,10 @@ class AccountPolicy < ApplicationPolicy
|
||||
admin?
|
||||
end
|
||||
|
||||
def remove_avatar?
|
||||
staff?
|
||||
end
|
||||
|
||||
def subscribe?
|
||||
admin?
|
||||
end
|
||||
|
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