From c6b95bc3f6e06df74f2b3ca0b9d6b5570816f525 Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Thu, 5 Apr 2012 13:22:47 +1200 Subject: [PATCH] Do a bit_or() among multiple privilege settings. --- dba/caldav_functions.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dba/caldav_functions.sql b/dba/caldav_functions.sql index bfb71aa4..24313bf0 100644 --- a/dba/caldav_functions.sql +++ b/dba/caldav_functions.sql @@ -1017,7 +1017,7 @@ BEGIN RETURN ~ out_conferred; END IF; - SELECT privileges INTO out_conferred FROM grants + SELECT bit_or(privileges) INTO out_conferred FROM grants WHERE by_collection = grantor_collection AND (to_principal=in_accessor OR to_principal IN (SELECT expand_memberships(in_accessor,in_depth)));