1
0
Fork 0
mirror of https://github.com/Kozea/Radicale.git synced 2025-08-10 18:40:53 +00:00

log in case delete of collection is prevented

This commit is contained in:
Peter Bieringer 2024-09-29 17:44:21 +02:00
parent d15e836079
commit 40c8b3d038

View file

@ -25,6 +25,7 @@ from typing import Optional
from radicale import httputils, storage, types, xmlutils from radicale import httputils, storage, types, xmlutils
from radicale.app.base import Access, ApplicationBase from radicale.app.base import Access, ApplicationBase
from radicale.hook import HookNotificationItem, HookNotificationItemTypes from radicale.hook import HookNotificationItem, HookNotificationItemTypes
from radicale.log import logger
def xml_delete(base_prefix: str, path: str, collection: storage.BaseCollection, def xml_delete(base_prefix: str, path: str, collection: storage.BaseCollection,
@ -82,6 +83,7 @@ class ApplicationPartDelete(ApplicationBase):
) )
xml_answer = xml_delete(base_prefix, path, item) xml_answer = xml_delete(base_prefix, path, item)
else: else:
logger.info("delete of collection is prevented by config/option [rights] permit_delete_collection: %s", path)
return httputils.NOT_ALLOWED return httputils.NOT_ALLOWED
else: else:
assert item.collection is not None assert item.collection is not None