protected function getRoleAccessCallback()
    {
        return function ($key, $val, $index) {
            /** @var Token $sessionAuth */
            if (!$this->session->isStarted()) {
                return ['disabled' => 'disabled'];
            }
            $sessionAuth = $this->session->get('authentication');
            $currentUser = $sessionAuth->getUser();
            $allowedRoles = $this->permissions->getManipulatableRoles($currentUser->toArray());

            return in_array($key, $allowedRoles) ? [] : ['disabled' => 'disabled'];
        };
    }