Kernel::WebApp::Controller::API::Role::RequiresAgentConfigItemPermission

NAME

Kernel::WebApp::Controller::API::Role::RequiresAgentConfigItemPermission – Require permission for the current configuration item.

PUBLIC INTERFACE

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

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

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

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

ConfigItemAgentPermissionType()

this method provides permission that the customer user needs to have for the current configuration item, defaults to rw. You can override the default value to change this:

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