From 346724d5083370796c755cc458ed86b42d666911 Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Thu, 23 Nov 2006 20:15:02 +1300 Subject: [PATCH] Allow a user to have full permissions to their own calendars(!) --- dba/caldav_functions.sql | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dba/caldav_functions.sql b/dba/caldav_functions.sql index b1072904..fe7535e1 100644 --- a/dba/caldav_functions.sql +++ b/dba/caldav_functions.sql @@ -205,6 +205,11 @@ DECLARE tmp_confers TEXT; dbg TEXT DEFAULT ''''; BEGIN + -- Self can always have full access + IF in_from = in_to THEN + RETURN ''RW''; + END IF; + -- dbg := ''S-''; SELECT rt1.confers INTO out_confers FROM relationship r1 JOIN relationship_type rt1 USING ( rt_id ) WHERE NOT rt1.rt_isgroup AND r1.from_user = in_from AND r1.to_user = in_to;