public function revokeUserAccess($resource, string $action)
    {
        $resourceRule = $this->getUserPermission($resource);

        if (!$resourceRule) {
            return;
        }

        // make sure we can work with this
        if ($resourceRule && !($resourceRule instanceof UserPermissionInterface)) {
            throw new PermissionExpectedException(UserPermissionInterface::class, \get_class($resourceRule));
        }

        if ($resourceRule) {
            if (!\in_array($action, $resourceRule->getActions(), true)) {
                return;
            }
            $resourceRule->removeAction($action);
            $this->userPermissions->update($resourceRule);
        }
    }