the page for a public branch stacked on a private one should shout at you
Bug #568128 reported by
Michael Hudson-Doyle
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Launchpad itself |
Fix Released
|
High
|
Ian Booth |
Bug Description
It's very unlikely that you actually want to have a public branch stacked on a private one -- because people who cannot see the stacked-on branch cannot see the stacked branch -- so the branch page should show a warning about this.
Related branches
lp:~wallyworld/launchpad/public-branch-stackedon-private-568128
- Curtis Hovey (community): Approve (code)
-
Diff: 1240 lines (+403/-314)29 files modifiedlib/lp/app/browser/tests/test_launchpad.py (+2/-3)
lib/lp/code/browser/branch.py (+31/-5)
lib/lp/code/browser/tests/test_branch.py (+3/-3)
lib/lp/code/browser/tests/test_branchmergeproposal.py (+1/-1)
lib/lp/code/doc/branch-visibility.txt (+0/-240)
lib/lp/code/interfaces/branch.py (+20/-3)
lib/lp/code/model/branch.py (+23/-4)
lib/lp/code/model/branchcollection.py (+6/-5)
lib/lp/code/model/branchlookup.py (+3/-2)
lib/lp/code/model/branchnamespace.py (+1/-1)
lib/lp/code/model/revision.py (+3/-3)
lib/lp/code/model/tests/test_branch.py (+24/-0)
lib/lp/code/model/tests/test_branchcollection.py (+1/-1)
lib/lp/code/model/tests/test_branchmergeproposal.py (+4/-4)
lib/lp/code/model/tests/test_branchvisibility.py (+187/-0)
lib/lp/code/model/tests/test_revision.py (+4/-4)
lib/lp/code/model/tests/test_sourcepackagerecipe.py (+1/-1)
lib/lp/code/model/tests/test_sourcepackagerecipebuild.py (+2/-2)
lib/lp/code/stories/branches/xx-branch-edit-privacy.txt (+33/-0)
lib/lp/code/stories/branches/xx-branch-index.txt (+24/-0)
lib/lp/code/stories/webservice/xx-branch.txt (+6/-2)
lib/lp/code/stories/webservice/xx-branchmergeproposal.txt (+2/-2)
lib/lp/code/templates/branch-index.pt (+1/-11)
lib/lp/code/templates/branch-portlet-privacy.pt (+6/-2)
lib/lp/code/xmlrpc/tests/test_branch.py (+1/-1)
lib/lp/registry/stories/product/xx-product-development-focus.txt (+1/-1)
lib/lp/testing/factory.py (+1/-1)
lib/lp/translations/tests/test_translationtemplatesbuildjob.py (+1/-1)
utilities/sourcedeps.cache (+11/-11)
Changed in launchpad-code: | |
status: | New → Triaged |
importance: | Undecided → Medium |
tags: | added: privacy |
tags: | added: disclosure |
Changed in launchpad: | |
importance: | Medium → High |
tags: | added: ui |
Changed in launchpad: | |
status: | Triaged → In Progress |
assignee: | nobody → Ian Booth (wallyworld) |
tags: |
added: qa-ok removed: qa-needstesting |
Changed in launchpad: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Since branch access is transitive, it is impossible to have a public branch on a private one. I expect the page to show the privacy ribbon to convey the situation.
We may want to redesign how lp treats this scenario in the data.
I do not think the lower branch should be set as private when pushed because the lower branch could become private after the higher is created. Changing the lower branch to public should not make the high branch public since it might contain private information.
I think the visibility rule (which is actually in play) is correct. The rules to check for visibility are wrong. IPrivacy( stacked_ branch) is not checking if the lower branch is private. It wrongly says the branch is public, so the privacy ribbon is missing. The visibility portlet does not check properly either. The portlet should say that the branch is private because the lower branch is private.