← Back to team overview

launchpad-reviewers team mailing list archive

lp:~wallyworld/launchpad/person-merge-ignore-accesspolicy-1024990 into lp:launchpad

 

Ian Booth has proposed merging lp:~wallyworld/launchpad/person-merge-ignore-accesspolicy-1024990 into lp:launchpad.

Requested reviews:
  Curtis Hovey (sinzui)
Related bugs:
  Bug #1024990 in Launchpad itself: "private teams cannot access their +junk branches without a subscription"
  https://bugs.launchpad.net/launchpad/+bug/1024990

For more details, see:
https://code.launchpad.net/~wallyworld/launchpad/person-merge-ignore-accesspolicy-1024990/+merge/121106

== Implementation ==

This branch needs to be landed after lp:~wallyworld/launchpad/accesspolicy-private-teams-1024990 is deployed, the latter being the work to add the new person column to the accesspolicy table.

We need to create a unique constraint on AccessPolicy.person but can't do that until this branch lands. This branch ensures person merges work with the unique constraint in place.

== Tests ==

bin/test -vvct person-merge.txt -t teammembership.txt -t vocabularies.txt -t test_person_merge_job -t test_personset

== Lint ==

Checking for conflicts and issues in changed files.

Linting changed files:
  lib/lp/registry/model/person.py

-- 
https://code.launchpad.net/~wallyworld/launchpad/person-merge-ignore-accesspolicy-1024990/+merge/121106
Your team Launchpad code reviewers is subscribed to branch lp:launchpad.
=== modified file 'lib/lp/registry/model/person.py'
--- lib/lp/registry/model/person.py	2012-08-21 04:28:11 +0000
+++ lib/lp/registry/model/person.py	2012-08-24 00:23:21 +0000
@@ -4211,6 +4211,10 @@
         # These table.columns will be skipped by the 'catch all'
         # update performed later
         skip = [
+            # The AccessPolicy.person reference is to allow private teams to
+            # see their own +junk branches. We don't allow merges for teams who
+            # own private branches so we can skip this column.
+            ('accesspolicy', 'person'),
             ('teammembership', 'person'),
             ('teammembership', 'team'),
             ('teamparticipation', 'person'),


Follow ups