4f51a46c2b
This change allows the administrator user to delete a contact and its related data like conversations, contact inboxes, and reports. Fixes #1929
37 lines
372 B
Ruby
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
|