Merge lp:~sinzui/launchpad/merge-and-private-branches into lp:launchpad
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Curtis Hovey | ||||
Approved revision: | no longer in the source branch. | ||||
Merged at revision: | 15638 | ||||
Proposed branch: | lp:~sinzui/launchpad/merge-and-private-branches | ||||
Merge into: | lp:launchpad | ||||
Diff against target: |
199 lines (+59/-8) 6 files modified
lib/lp/code/interfaces/branchcollection.py (+3/-0) lib/lp/code/model/branchcollection.py (+9/-1) lib/lp/code/model/tests/test_branchcollection.py (+15/-1) lib/lp/registry/browser/peoplemerge.py (+7/-0) lib/lp/registry/browser/tests/test_peoplemerge.py (+18/-5) lib/lp/registry/model/person.py (+7/-1) |
||||
To merge this branch: | bzr merge lp:~sinzui/launchpad/merge-and-private-branches | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Richard Harding (community) | Approve | ||
Review via email:
|
Commit message
Do not merge or delete teams with private branches.
Description of the change
I tried to delete a team that had private branches in projects with
branch visibility rules. Merge transfers artefacts that must have
owners, such as as branches to ~registry. Merge oopses because ~registry
does not have a policy for the project.
While this bug will disappear when BVP is removed. We do not want
~registry to own private branches. The delete page must explain that the
team cannot be deleted until the team's private branches are deleted or
the ownership is transferred to another person.
-------
RULES
Pre-
* Find or write a method that can lookup a person's private branches
without being constrained by viability.
* Update delete and merge page to explain that Launchpad does not know
what to do with the team's private branches. Someone must either change
the owner of each private branch or delete it so that confidential
information is neither lost or disclosed.
* ValidatingMerge
* Add an assert to check for private branches in PersonSet.Merge()
as is done for other conditions conditions where we want the views
to validate first.
QA
* Visit https:/
* Verify the page states that the team cannot be deleted
* Delete or change the owners of the private branches
* Visit https:/
* Verify the Delete action available; use it
* Verify the team is deleted after 10 minutes.
* Otherwise check for an email reporting an error.
LINT
lib/
lib/
lib/
lib/
lib/
lib/
TEST
./bin/test -vvc lp.code.
./bin/test -vvc lp.registry.
./bin/test -vvc lp.registry.
IMPLEMENTATION
Added isPrivate() to the IALlBranches collection that will be used
in conjunction with ownedBy() to get all private branches a person owns
without being constrained by the normal visibility checks.
lib/
lib/
lib/
Check for private branches and advise the user to delete or transfer
them.
lib/
lib/
Add an assert to ensure callsites check for private branches before
calling merge.
lib/