Chatwoot/app/policies/contact_policy.rb
Aswin Dev P.S 4f51a46c2b
feat: Ability to delete a contact (#2984)
This change allows the administrator user to delete a contact and its related data like conversations, contact inboxes, and reports.

Fixes #1929
2021-09-23 12:52:49 +05:30

37 lines
372 B
Ruby

class ContactPolicy < ApplicationPolicy
def index?
true
end
def active?
true
end
def import?
@account_user.administrator?
end
def search?
true
end
def update?
true
end
def contactable_inboxes?
true
end
def show?
true
end
def create?
true
end
def destroy?
@account_user.administrator?
end
end