57 Commits

Author SHA1 Message Date
Andrew McMillan
05d42557d7 Update davical.sql to 1.2.10. 2011-09-12 09:49:32 +12:00
Andrew McMillan
b4364fb999 Fix for the following error:
davical: LOG: principals/users/cars/hilux/: Query: QF: SQL error "42804" - ERROR: column "changed_by" is of type integer but expression is of type name LINE 1: ...on, property_name, property_value ) VALUES( path, user, curr... ^ HINT: You will need to rewrite or cast the expression. QUERY: INSE
davical: LOG: principals/users/cars/hilux/: Query: QF: RT INTO property ( dav_name, changed_by, changed_on, property_name, property_value ) VALUES( path, user, current_timestamp, key, value ) CONTEXT: PL/pgSQL function "set_dav_property" line 16 at SQL statement"
davical: LOG: principals/users/cars/hilux/: Query: QF: SELECT set_dav_property( :dav_name, :user_no, :tag::text, :value::text)
davical: LOG: principals/users/cars/hilux/: Query: QF:     ":dav_name" => "/cars/hilux/"
davical: LOG: principals/users/cars/hilux/: Query: QF:     ":user_no" => "1023"
davical: LOG: principals/users/cars/hilux/: Query: QF:     ":tag" => "http://apple.com/ns/ical/:calendar-color"
davical: LOG: principals/users/cars/hilux/: Query: QF:     ":value" => "#711A76"

From 'mate' on IRC.
2011-08-28 16:38:14 +12:00
Andrew McMillan
493ec64cba Extend default_privileges to members of a group.
Signed-off-by: Andrew McMillan <andrew@morphoss.com>
2011-01-03 10:10:52 +13:00
Andrew McMillan
4e12eb82e4 Update sync-collection REPORT to match -04 of draft. 2010-11-30 12:31:25 +13:00
Andrew McMillan
6ebc542c2a Rename variable to work around Pg 9.0 reserved name. 2010-11-04 00:55:18 +13:00
Andrew McMillan
32a747da8e Fix privilege_to_bits function to set 'all' correctly & work with recent postgres 2010-10-09 08:54:51 -04:00
Andrew McMillan
8111c1cc9c Return NULL if we got given a sync token we know nothing about. 2010-09-25 22:27:09 +12:00
Andrew McMillan
b855a3cbc3 Fix write_sync_changes to cope with non-calendar resources. 2010-09-23 23:20:09 +12:00
Andrew McMillan
bb2435eb34 Rename 'all' variable which appears to be a reserved word in PostgreSQL 9 2010-05-09 09:05:23 +12:00
Andrew McMillan
b806fa8305 A new trigger allowing calendar_alarm.component to be edited.
The trigger will then cause the caldav_data record to be
updated with the new alarm component, and the etag is changed.
2010-04-03 17:28:01 +13:00
Andrew McMillan
7cdd7ce0ef Teach set_dav_property() about dav_bindings. 2010-03-24 23:52:07 +13:00
Andrew McMillan
0492cb38bb Tweak privileges_list() to work in older Pg versions. 2010-02-27 15:21:33 +13:00
Andrew McMillan
fb5cd0403f Fix property setting to include principals. 2010-02-17 23:53:28 +13:00
Andrew McMillan
1cd3d8c896 Remove unused functions. 2009-12-21 18:56:52 +13:00
Andrew McMillan
19199d5f86 Replaced the old get_permissions() call with the new permissions model. 2009-12-21 13:04:25 +13:00
Andrew McMillan
8aeb837f8c Another attempt at supporting older DB versions. 2009-12-04 23:18:55 +13:00
Andrew McMillan
c59a565588 Fix initialisation of empty array for older Pg versions. 2009-12-04 23:15:34 +13:00
Andrew McMillan
60a6aeeecd New functions for listing memberships, members and privileges. 2009-11-22 22:30:59 +13:00
Andrew McMillan
ecbce99884 Granting for collection_id rather than dav_name now. 2009-11-22 00:24:09 +13:00
Andrew McMillan
3df6ccc4ba Getting 'MOVE' working has proven surprisingly complex. 2009-11-04 00:17:10 +13:00
Andrew McMillan
10bfc96016 Structure changes for grants on collections. 2009-10-27 09:15:42 +13:00
Andrew McMillan
2ca3ae7d44 Move to new privileges - started now. 2009-10-17 17:59:53 +13:00
Andrew McMillan
d0c23e594d Moving patch changes into standard DB creation path. 2009-10-16 14:07:29 +13:00
Andrew McMillan
3c794e7c2d Hopefully final fix to get_permissions during the lifetime of this modeHopefully final fix to get_permissions during the lifetime of this model 2009-10-03 22:57:44 +13:00
Andrew McMillan
4c70e3ebd3 Testing is a wonderful thing! This is fixed as a result :-) 2009-09-30 22:46:37 +13:00
Andrew McMillan
f9bc44b958 Convert function definitions to $$ ... $$ syntax and officially give up on 7.4 2009-09-29 13:30:36 +13:00
Andrew McMillan
149a990db6 Expand permissions on both sides of the group expansion. 2009-09-25 00:51:43 +12:00
Andrew McMillan
b5eeb796dd Ensure the etag doesn't match the getctag for the calendar.
Just in case a client somewhere is doing something silly with them
that would screw up in that situation.
2009-06-19 00:00:22 +12:00
Andrew McMillan
bd279e519e Triggers to handle renaming of collections/entries on user rename. 2009-04-15 15:41:37 +12:00
Andrew McMillan
10242f51ee When we exceed count we should return null. 2009-04-13 21:00:09 +12:00
Andrew McMillan
f19481f849 Fix bug in handling of time-range queries. 2009-04-13 17:37:05 +12:00
Andrew McMillan
be3f2ab3e3 Correct quoting. 2008-10-27 14:37:11 +13:00
Andrew McMillan
895f515838 Better handling for daily + byday rules. 2008-10-26 22:15:39 +13:00
Andrew McMillan
a2081daddb Change trigger to more predictable etag values. 2008-10-26 11:21:11 +13:00
Andrew McMillan
c429760384 Add a trigger to caldav_data to ensure the collection etag (ctag) changes
when a calendar item changes.
2008-10-24 17:58:20 +13:00
Andrew McMillan
ef37ca3212 With multiple relationships, the best one applies. 2008-06-18 22:08:20 +12:00
Andrew McMillan
1e319b60c7 Ensure expanded 'A' is unexpanded in the end. 2008-01-25 08:00:15 +13:00
Andrew McMillan
30e0e47e71 Improve performance of get_permissions when groups are involved. 2008-01-23 10:48:33 +13:00
Andrew McMillan
3dd67ed0b0 Fix typo. 2008-01-21 17:31:26 +13:00
Andrew McMillan
e719a888ab Add a function to assist with renaming users. 2008-01-19 12:26:39 +13:00
Andrew McMillan
82fd372c0c Add a function to provide a textual list of relationships for display. 2007-03-19 14:12:37 +12:00
Andrew McMillan
0292764597 Change to work on PostgreSQL 7.4 and 8.0. 2007-03-09 09:25:41 +13:00
Andrew McMillan
7003fe5658 A few tweaks to make things work with the fields we just got rid of. 2006-12-27 21:29:55 +13:00
Andrew McMillan
11f3455e27 Remove the fromgroup / togroup entirely from relationship types and go for
a much simpler model entirely.
2006-12-27 15:20:23 +13:00
Andrew McMillan
7a1b2a0dd0 The prefix_match field and rt_inverse field are removed from relationship_type
because that model was too complex to be useful.  We also explicitly indicate
whether the relationship source or destination are groups separately.
2006-12-27 14:29:19 +13:00
Andrew McMillan
798e016f3e Added a set_dav_property function. 2006-12-21 01:00:36 +13:00
Andrew McMillan
8a6348e736 Add freebusy support. Remove different Pg8.1 code path which is probably
not actually any better than the 7.4 compatible implementation.
2006-12-11 13:19:09 +13:00
Andrew McMillan
3f3804cd43 Enhanced permissions calculation which now supports the idea of bind/unbind
and 'all'.
2006-12-11 12:37:07 +13:00
Andrew McMillan
3459bff7df We don't need to loop 100 times to see there is a problem. And when we do
we should describe it better as well.
2006-12-01 23:32:55 +13:00
Andrew McMillan
786bc35c96 Chandler was sending a rule containing only FREQ=MONTHLY which caused
problems with the REPORT that Mozilla Calendar requests.  This fixes
that, and a number of other strange situations that could occur.
2006-12-01 10:20:11 +13:00