log in case delete of collection is prevented
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user