← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~wgrant/launchpad/product-aps-db into lp:launchpad/db-devel

 

William Grant has proposed merging lp:~wgrant/launchpad/product-aps-db into lp:launchpad/db-devel.

Commit message:
Add Product.access_policies and index AccessPolicyGrantFlat(grantee, policy). Preparation for ProductSet.getProductPrivacyFilter rewrite.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)
Related bugs:
  Bug #1452949 in Launchpad itself: "Timeout error while trying to access team site"
  https://bugs.launchpad.net/launchpad/+bug/1452949

For more details, see:
https://code.launchpad.net/~wgrant/launchpad/product-aps-db/+merge/263061

Add Product.access_policies and index AccessPolicyGrantFlat(grantee, policy). Preparation for ProductSet.getProductPrivacyFilter rewrite.

Product.access_policies is similar to Bug/Branch/Specification/GitRepository.access_policies, except that an AccessArtifactGrant is sufficient to confer LimitedView, rather than requiring an AccessPolicyGrant and conferring View.
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~wgrant/launchpad/product-aps-db into lp:launchpad/db-devel.
=== added file 'database/schema/patch-2209-67-1.sql'
--- database/schema/patch-2209-67-1.sql	1970-01-01 00:00:00 +0000
+++ database/schema/patch-2209-67-1.sql	2015-06-26 06:38:44 +0000
@@ -0,0 +1,11 @@
+-- Copyright 2015 Canonical Ltd.  This software is licensed under the
+-- GNU Affero General Public License version 3 (see the file LICENSE).
+
+SET client_min_messages=ERROR;
+
+ALTER TABLE product ADD COLUMN access_policies integer[];
+
+CREATE INDEX accesspolicygrantflat__grantee__policy__idx
+    ON accesspolicygrantflat (grantee, policy);
+
+INSERT INTO LaunchpadDatabaseRevision VALUES (2209, 67, 1);