readme_baikal_sabredav.txt 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. PROBLEM:
  2. --------
  3. caldavzap reads and saves session settings persistently in the caldav server by
  4. PROPPATCH / PROPFIND in a principal property '{http://inf-it.com/ns/dav/}settings'.
  5. Unfortunately, sabredav and sabredav based caldav servers...
  6. - do not provide access to new or non-standard properties
  7. - do not provide write access to principal properties with PROPPATCH
  8. SOLUTION:
  9. ---------
  10. An ideal and clean solution would be a sabredav plugin which allows creation and
  11. access to arbitrary new principal properties. Since such a plugin doesn't exist,
  12. I'll show here a hack which modifies baikal to just provide the specific principal
  13. property '{http://inf-it.com/ns/dav/}settings' which is needed by caldavzap.
  14. The following steps apply to baikal 0.2.7 but should be applicable to any
  15. sabredav based server.
  16. 1. modify your sql databse:
  17. add a text type database entry to the principals table which will hold the settings.
  18. This can be done by sql commands or by using a gui frontend for your database.
  19. I've named this text field 'inf_it_settings'.
  20. Example: the sqlite structure of the principals table should then look like this:
  21. CREATE TABLE 'principals' ( id INTEGER PRIMARY KEY ASC, uri TEXT, email TEXT,
  22. displayname TEXT, vcardurl TEXT, inf_it_settings TEXT, UNIQUE(uri) )
  23. 2. apply the patch baikal-flat-0.2.7-for-caldavzap.diff to patch the baikal server.
  24. This patch does two things:
  25. a) it modifies vendor/sabre/dav/lib/Sabre/DAVACL/PrincipalBackend/PDO.php to map
  26. requests for the property '{http://inf-it.com/ns/dav/}settings' to the newly created
  27. database field inf_it_settings (see above 1.)
  28. b) it modifies vendor/sabre/dav/lib/Sabre/DAVACL/Principal.php to give write
  29. access to principal properties ('write' includes 'write-properties').