Restructure omni services and add Chatwoot research snapshot
This commit is contained in:
29
research/chatwoot/app/policies/agent_bot_policy.rb
Normal file
29
research/chatwoot/app/policies/agent_bot_policy.rb
Normal file
@@ -0,0 +1,29 @@
|
||||
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
|
||||
Reference in New Issue
Block a user