public function deleteGroup(EventInterface $event) {
        $accessControl = $event->getAccessControl();
        if (!($accessControl instanceof MutableAdapterInterface)) {
            throw new ResourceException('Access control adapter is immutable', 405);
        }

        $route = $event->getRequest()->getRoute();
        $groupName = $route->get('group');
        $group = $accessControl->getGroup($groupName);

        if (!$group) {
            throw new ResourceException('Resource group not found', 404);
        }

        $accessControl->deleteResourceGroup($groupName);
   }