1
0
Fork 0
mirror of https://github.com/Kozea/Radicale.git synced 2025-06-26 16:45:52 +00:00

limit only to VALARM, VFREEBUSY support was not added so far

This commit is contained in:
Peter Bieringer 2025-05-16 05:39:19 +02:00
parent f56416b2fb
commit c09a098866
2 changed files with 4 additions and 4 deletions

View file

@ -1,7 +1,7 @@
# Changelog
## 3.5.4.dev
* Improve: item filter enhanced for 3rd level supporting VALARM and VFREEBUSY (only component existence so far)
* Improve: item filter enhanced for 3rd level supporting VALARM and honoring TRIGGER (offset or absolute)
## 3.5.3
* Add: [auth] htpasswd: support for Argon2 hashes

View file

@ -88,8 +88,7 @@ def comp_match(item: "item.Item", filter_: ET.Element, level: int = 0) -> bool:
"""
# TODO: Improve filtering for VALARM and VFREEBUSY
# so far only filtering based on existence of such component is implemented
# TODO: Filtering VFREEBUSY is not implemented
# HACK: the filters are tested separately against all components
name = filter_.get("name", "").upper()
@ -117,7 +116,7 @@ def comp_match(item: "item.Item", filter_: ET.Element, level: int = 0) -> bool:
return False
if ((level == 0 and name != "VCALENDAR") or
(level == 1 and name not in ("VTODO", "VEVENT", "VJOURNAL")) or
(level == 2 and name not in ("VALARM", "VFREEBUSY"))):
(level == 2 and name not in ("VALARM"))):
logger.warning("Filtering %s is not supported", name)
return True
# Point #3 and #4 of rfc4791-9.7.1
@ -133,6 +132,7 @@ def comp_match(item: "item.Item", filter_: ET.Element, level: int = 0) -> bool:
if not subcomp:
return False
if hasattr(subcomp, "trigger"):
# rfc4791-7.8.5:
trigger = subcomp.trigger.value
for child in filter_:
if child.tag == xmlutils.make_clark("C:prop-filter"):