Merge ~cjwatson/launchpad:snapbuild-requester-visibility into launchpad:master

Proposed by Colin Watson
Status: Merged
Approved by: Colin Watson
Approved revision: 2fc29d02b45e13522aa3b1770684ce4841e86480
Merge reported by: Otto Co-Pilot
Merged at revision: not available
Proposed branch: ~cjwatson/launchpad:snapbuild-requester-visibility
Merge into: launchpad:master
Diff against target: 44 lines (+13/-2)
2 files modified
lib/lp/registry/model/person.py (+2/-1)
lib/lp/registry/tests/test_team.py (+11/-1)
Reviewer Review Type Date Requested Status
Cristian Gonzalez (community) Approve
Review via email: mp+398007@code.launchpad.net

Commit message

Don't block team visibility changes due to SnapBuild.requester

To post a comment you must log in.
Revision history for this message
Cristian Gonzalez (cristiangsp) wrote :

Looks good!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/lib/lp/registry/model/person.py b/lib/lp/registry/model/person.py
index 4746d64..b7c95db 100644
--- a/lib/lp/registry/model/person.py
+++ b/lib/lp/registry/model/person.py
@@ -1,4 +1,4 @@
1# Copyright 2009-2020 Canonical Ltd. This software is licensed under the1# Copyright 2009-2021 Canonical Ltd. This software is licensed under the
2# GNU Affero General Public License version 3 (see the file LICENSE).2# GNU Affero General Public License version 3 (see the file LICENSE).
33
4"""Implementation classes for a Person."""4"""Implementation classes for a Person."""
@@ -2353,6 +2353,7 @@ class Person(
2353 ('productseries', 'owner'),2353 ('productseries', 'owner'),
2354 ('sharingjob', 'grantee'),2354 ('sharingjob', 'grantee'),
2355 ('signedcodeofconduct', 'owner'),2355 ('signedcodeofconduct', 'owner'),
2356 ('snapbuild', 'requester'),
2356 ('specificationsubscription', 'person'),2357 ('specificationsubscription', 'person'),
2357 ('sshkey', 'person'),2358 ('sshkey', 'person'),
2358 ('structuralsubscription', 'subscriber'),2359 ('structuralsubscription', 'subscriber'),
diff --git a/lib/lp/registry/tests/test_team.py b/lib/lp/registry/tests/test_team.py
index 7ffc5e1..e860410 100644
--- a/lib/lp/registry/tests/test_team.py
+++ b/lib/lp/registry/tests/test_team.py
@@ -1,4 +1,4 @@
1# Copyright 2010-2018 Canonical Ltd. This software is licensed under the1# Copyright 2010-2021 Canonical Ltd. This software is licensed under the
2# GNU Affero General Public License version 3 (see the file LICENSE).2# GNU Affero General Public License version 3 (see the file LICENSE).
33
4"""Tests for PersonSet."""4"""Tests for PersonSet."""
@@ -587,6 +587,16 @@ class TestVisibilityConsistencyWarning(TestCaseWithFactory):
587 None,587 None,
588 self.team.visibilityConsistencyWarning(PersonVisibility.PRIVATE))588 self.team.visibilityConsistencyWarning(PersonVisibility.PRIVATE))
589589
590 def test_no_warning_for_SnapBuild_requester(self):
591 # Sometimes snap recipe builds can end up having their requester set
592 # to a team for one reason or another. This doesn't cause a
593 # warning, since the requester does not expose team membership
594 # information.
595 self.factory.makeSnapBuild(
596 requester=self.team, snap=self.factory.makeSnap())
597 self.assertIsNone(
598 self.team.visibilityConsistencyWarning(PersonVisibility.PRIVATE))
599
590600
591class TestPersonJoinTeam(TestCaseWithFactory):601class TestPersonJoinTeam(TestCaseWithFactory):
592602

Subscribers

People subscribed via source and target branches

to status/vote changes: