Restructure omni services and add Chatwoot research snapshot
This commit is contained in:
31
research/chatwoot/app/policies/article_policy.rb
Normal file
31
research/chatwoot/app/policies/article_policy.rb
Normal file
@@ -0,0 +1,31 @@
|
||||
class ArticlePolicy < ApplicationPolicy
|
||||
def index?
|
||||
@account.users.include?(@user)
|
||||
end
|
||||
|
||||
def update?
|
||||
@account_user.administrator?
|
||||
end
|
||||
|
||||
def show?
|
||||
@account_user.administrator?
|
||||
end
|
||||
|
||||
def edit?
|
||||
@account_user.administrator?
|
||||
end
|
||||
|
||||
def create?
|
||||
@account_user.administrator?
|
||||
end
|
||||
|
||||
def destroy?
|
||||
@account_user.administrator?
|
||||
end
|
||||
|
||||
def reorder?
|
||||
@account_user.administrator?
|
||||
end
|
||||
end
|
||||
|
||||
ArticlePolicy.prepend_mod_with('ArticlePolicy')
|
||||
Reference in New Issue
Block a user