health-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Health-dev] [bug #62792] health_caldav do not work well with thunderbir


From: Feng Shu
Subject: [Health-dev] [bug #62792] health_caldav do not work well with thunderbird and evolution
Date: Thu, 28 Jul 2022 01:33:15 -0400 (EDT)

Follow-up Comment #3, bug #62792 (project health):

Let Evolution work have another problems, and seem to more than thunderbird's
issue, At the moment, I can not let it work.

1. health_caldav/webdav.py

```
    def get_childs(cls, uri, filter=None, cache=None):
        pool = Pool()
        Calendar = pool.get('calendar.calendar')
        Event = pool.get('calendar.event')

        if uri in ('Calendars', 'Calendars/'):
            domain = cls._caldav_filter_domain_calendar(filter)
            domain = [['OR',
                    ('owner', '=', Transaction().user),
                    ('read_users', '=', Transaction().user),
                    ],
                domain]
            calendars = Calendar.search(domain)
           
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ In this
place, calendars is []
 
            if cache is not None:
                cache.setdefault('_calendar', {})
                cache['_calendar'].setdefault(Calendar.__name__, {})
                for calendar in calendars:
                    cache['_calendar'][Calendar.__name__][calendar.id] = {}
            return ([x.name for x in calendars]
                + [x.name + '.ics' for x in calendars])
```

2. /health-pywebdav3-server/pywebdav/lib/report.py

```
    def create_prop(self):
        """ handle a <prop> request

        This will

        1. set up the <multistatus>-Framework

        2. read the property values for each URI 
           (which is dependant on the Depth header)
           This is done by the get_propvalues() method.

        3. For each URI call the append_result() method
           to append the actual <result>-Tag to the result
           document.

        We differ between "good" properties, which have been
        assigned a value by the interface class and "bad" 
        properties, which resulted in an error, either 404
        (Not Found) or 403 (Forbidden).

        """


        # create the document generator
        doc = domimpl.createDocument(None, "multistatus", None)
        ms = doc.documentElement
        ms.setAttribute("xmlns:D", "DAV:")
        ms.tagName = 'D:multistatus'

        if self._depth=="0":
            if self._uri in
self._dataclass.get_childs(get_parenturi(self._uri),
                    self.filter):
                gp,bp=self.get_propvalues(self._uri)
                res=self.mk_prop_response(self._uri,gp,bp,doc)
                ms.appendChild(res)

            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  In
this place, no proper response, maybe code logic error.

```



    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?62792>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]