Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com> Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com> Co-authored-by: iamsivin <iamsivin@gmail.com> Co-authored-by: Shivam Mishra <scm.mymail@gmail.com>
30 lines
480 B
Ruby
30 lines
480 B
Ruby
class AgentBotPolicy < ApplicationPolicy
|
|
def index?
|
|
@account_user.administrator? || @account_user.agent?
|
|
end
|
|
|
|
def update?
|
|
@account_user.administrator?
|
|
end
|
|
|
|
def show?
|
|
@account_user.administrator? || @account_user.agent?
|
|
end
|
|
|
|
def create?
|
|
@account_user.administrator?
|
|
end
|
|
|
|
def destroy?
|
|
@account_user.administrator?
|
|
end
|
|
|
|
def avatar?
|
|
@account_user.administrator?
|
|
end
|
|
|
|
def reset_access_token?
|
|
@account_user.administrator?
|
|
end
|
|
end
|