Kernel::WebApp::Controller::API::Role::RequiresAgentKnowledgeBaseArticlePermission

NAME

Kernel::WebApp::Controller::API::Role::RequiresAgentKnowledgeBaseArticlePermission – Require permission for the current knowledge base articles(s).

PUBLIC INTERFACE

Just consume this role to make sure that your endpoint can only be used by agents with permission for the current knowledge base article(s) (see further below for which permission and which knowledge base articles):

    with qw(
        Kernel::WebApp::Controller::API::Role::RequiresAgentKnowledgeBaseArticlePermission
    )

It works by wrapping a default implementation around Kernel::WebApp::Controller::API::Base::Authorize(), which requires knowledge base article permission or otherwise sends a 403 Forbidden response.

You can still provide your own Authorize() method to perform additional checks in the endpoint.

KBAAgentPermissionType()

this method provides permission that the customer user needs to have for the current knowledge base article(s), defaults to rw. You can override the default value to change this:

    sub KBAAgentPermissionType {
        return 'rw';
    }
Scroll to Top