Files
chatwoot/app/policies/article_policy.rb
Sojan Jose 1a78a9243f chore: Clean up report & knowledge base policies (#11234)
- Removes the portal_members table and all associated records
- Updates policies to use custom roles with knowledge_base_manage
permission
- Updates controllers, models, and views to work without portal
membership
- Adds tests for the new permission model
2025-04-03 16:00:32 -07:00

32 lines
469 B
Ruby

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')