Merge lp:~thumper/launchpad/branch-visibility-fubar into lp:launchpad

Proposed by Tim Penhey
Status: Merged
Approved by: Michael Hudson-Doyle
Approved revision: not available
Merged at revision: 9904
Proposed branch: lp:~thumper/launchpad/branch-visibility-fubar
Merge into: lp:launchpad
Diff against target: 73 lines (+41/-3)
2 files modified
lib/lp/registry/stories/product/xx-product-development-focus.txt (+37/-0)
lib/lp/registry/templates/product-index.pt (+4/-3)
To merge this branch: bzr merge lp:~thumper/launchpad/branch-visibility-fubar
Reviewer Review Type Date Requested Status
Michael Hudson-Doyle Approve
Review via email: mp+14982@code.launchpad.net

Commit message

Check that the user can see the branch on the project overview page.

To post a comment you must log in.
Revision history for this message
Tim Penhey (thumper) wrote :

When I added the branch link on the front page for projects, I forgot to make sure that the user can see the branch.

This branch fixes that problem.

Tests:
  xx-product-development-focus

Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

Looks fine. Nice to get this fixed quickly :)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'lib/lp/registry/stories/product/xx-product-development-focus.txt'
--- lib/lp/registry/stories/product/xx-product-development-focus.txt 2009-11-11 01:11:04 +0000
+++ lib/lp/registry/stories/product/xx-product-development-focus.txt 2009-11-18 06:30:32 +0000
@@ -120,3 +120,40 @@
120 (http://launchpad.dev/fooix/trunk/+linkbranch)120 (http://launchpad.dev/fooix/trunk/+linkbranch)
121 View the branch content121 View the branch content
122 (http://bazaar.launchpad.dev/~eric/fooix/trunk/files)122 (http://bazaar.launchpad.dev/~eric/fooix/trunk/files)
123
124
125Private development focus branches
126----------------------------------
127
128If the development focus branch is private, then for unauthorized viewers, it
129appears as if there is no series branch set.
130
131 >>> login('admin@canonical.com')
132 >>> from zope.security.proxy import removeSecurityProxy
133 >>> removeSecurityProxy(branch).private = True
134 >>> logout()
135
136 >>> anon_browser.open('http://launchpad.dev/fooix')
137 >>> print_development_focus(anon_browser)
138 Development focus:
139 trunk series
140 Development focus branch has not been specified
141 Links:
142 trunk series (/fooix/trunk)
143
144 >>> owner_browser.open('http://launchpad.dev/fooix')
145 >>> print_development_focus(owner_browser)
146 Development focus:
147 trunk series Change details
148 lp://dev/~eric/fooix/trunk Change branch
149 View the branch content
150 Links:
151 trunk series (/fooix/trunk)
152 <span class="invisible-link">Change details</span>
153 (http://launchpad.dev/fooix/+edit)
154 lp://dev/~eric/fooix/trunk (http://code.launchpad.dev/~eric/fooix/trunk)
155 <span class="invisible-link">Change branch</span>
156 Change the branch for this series
157 (http://launchpad.dev/fooix/trunk/+linkbranch)
158 View the branch content
159 (https://bazaar.launchpad.dev/~eric/fooix/trunk/files)
123160
=== modified file 'lib/lp/registry/templates/product-index.pt'
--- lib/lp/registry/templates/product-index.pt 2009-11-11 01:01:55 +0000
+++ lib/lp/registry/templates/product-index.pt 2009-11-18 06:30:32 +0000
@@ -102,20 +102,21 @@
102102
103 <dl id="dev-focus"103 <dl id="dev-focus"
104 tal:define="dev_focus context/development_focus;104 tal:define="dev_focus context/development_focus;
105 trunk dev_focus/branch">105 trunk dev_focus/branch;
106 trunk_visible trunk/required:launchpad.View|nothing">
106 <dt>Development focus:</dt>107 <dt>Development focus:</dt>
107 <dd>108 <dd>
108 <p>109 <p>
109 <a tal:attributes="href dev_focus/fmt:url"110 <a tal:attributes="href dev_focus/fmt:url"
110 tal:content="string:${dev_focus/name} series" />&nbsp;111 tal:content="string:${dev_focus/name} series" />&nbsp;
111 <a tal:replace="structure overview_menu/edit/fmt:icon" /></p>112 <a tal:replace="structure overview_menu/edit/fmt:icon" /></p>
112 <p tal:condition="trunk">113 <p tal:condition="trunk_visible">
113 <a tal:replace="structure trunk/fmt:link" />&nbsp;114 <a tal:replace="structure trunk/fmt:link" />&nbsp;
114 <a tal:replace="structure dev_focus/menu:overview/link_branch/fmt:icon" />115 <a tal:replace="structure dev_focus/menu:overview/link_branch/fmt:icon" />
115 <br/>116 <br/>
116 <a tal:replace="structure trunk/menu:context/source/fmt:link"/>117 <a tal:replace="structure trunk/menu:context/source/fmt:link"/>
117 </p>118 </p>
118 <p tal:condition="not: trunk">119 <p tal:condition="not: trunk_visible">
119 Development focus branch has not been specified120 Development focus branch has not been specified
120 <a tal:replace="structure dev_focus/menu:overview/link_branch/fmt:icon" />121 <a tal:replace="structure dev_focus/menu:overview/link_branch/fmt:icon" />
121 </p>122 </p>