827f977a37
Added the ability to update the contact's avatar via API and Dashboard. - Contact create and update APIs can now accept avatar attachment parameters [form data]. - Contact create and update endpoints can now accept the avatar_url parameter.[json] - API endpoint to remove a contact avatar. - Updated Contact create/edit UI components with avatar support Fixes: #3428
49 lines
481 B
Ruby
49 lines
481 B
Ruby
class ContactPolicy < ApplicationPolicy
|
|
def index?
|
|
true
|
|
end
|
|
|
|
def active?
|
|
true
|
|
end
|
|
|
|
def import?
|
|
@account_user.administrator?
|
|
end
|
|
|
|
def search?
|
|
true
|
|
end
|
|
|
|
def filter?
|
|
true
|
|
end
|
|
|
|
def update?
|
|
true
|
|
end
|
|
|
|
def contactable_inboxes?
|
|
true
|
|
end
|
|
|
|
def destroy_custom_attributes?
|
|
true
|
|
end
|
|
|
|
def show?
|
|
true
|
|
end
|
|
|
|
def create?
|
|
true
|
|
end
|
|
|
|
def avatar?
|
|
true
|
|
end
|
|
|
|
def destroy?
|
|
@account_user.administrator?
|
|
end
|
|
end
|