Extend default_privileges to members of a group.

Signed-off-by: Andrew McMillan <andrew@morphoss.com>
This commit is contained in:
Andrew McMillan 2011-01-03 10:10:52 +13:00
parent ceab80bce4
commit 493ec64cba
2 changed files with 9 additions and 4 deletions

View File

@ -929,7 +929,12 @@ BEGIN
SELECT privileges FROM grants WHERE by_principal=in_grantor AND by_collection IS NULL
AND (to_principal=in_accessor OR to_principal IN (SELECT expand_memberships(in_accessor,in_depth)))
UNION
SELECT 32::BIT(24) AS privileges FROM expand_memberships(in_accessor,in_depth) WHERE expand_memberships = in_grantor
SELECT bit_or(sq2.privileges) FROM
(
SELECT 32::BIT(24) AS privileges FROM expand_memberships(in_accessor,in_depth) WHERE expand_memberships = in_grantor
UNION
SELECT default_privileges AS privileges FROM principal WHERE principal_id = in_grantor
) AS sq2
) AS subquery ;
IF out_conferred IS NULL THEN

View File

@ -1,9 +1,9 @@
Summary: Group does not confer default permission to members
Status: New
Status: Finished
CreatedBy: Andrew McMillan <andrew@morphoss.com>
AssignedTo:
AssignedTo: Andrew McMillan <andrew@morphoss.com>
Inserted: 2010-12-29T23:42:42
Updated: 2010-12-29T23:42:42
Updated: 2011-01-02T21:10:16
A member of a group should have a minimum of the default permission
granted to them when accessing things owned directly by that group.