]> source.dussan.org Git - gitblit.git/commitdiff
Fixed url panel failure when there are no repository urls (issue 269)
authorJames Moger <james.moger@gitblit.com>
Mon, 15 Jul 2013 12:09:20 +0000 (08:09 -0400)
committerJames Moger <james.moger@gitblit.com>
Mon, 15 Jul 2013 12:09:20 +0000 (08:09 -0400)
releases.moxie
src/main/java/com/gitblit/wicket/panels/RepositoryUrlPanel.java

index d9e303589d7ccebe84c4b02f293a781acea1f6f7..3f07613a8e8e90d1cc792423eba07855b1ae78b1 100644 (file)
@@ -9,7 +9,8 @@ r18: {
     html: ~
     text: ~
     security: ~
-    fixes: ~
+    fixes:
+       - Gitblit-as-viewer with no repository urls failed to display summary page (issue 269)
     changes: ~
     additions: ~
     dependencyChanges: ~
index 3711ca9ab8a97dd68861b6469780ca3a8bbd9edb..aaab2b1cbc5290cea05f98033207a99757b26832 100644 (file)
@@ -85,7 +85,7 @@ public class RepositoryUrlPanel extends BasePanel {
                // grab primary url from the top of the list\r
                primaryUrl = repositoryUrls.size() == 0 ? null : repositoryUrls.get(0);\r
 \r
-               boolean canClone = ((primaryUrl.permission == null) || primaryUrl.permission.atLeast(AccessPermission.CLONE));\r
+               boolean canClone = primaryUrl != null && ((primaryUrl.permission == null) || primaryUrl.permission.atLeast(AccessPermission.CLONE));\r
 \r
                if (repositoryUrls.size() == 0 || !canClone) {\r
                        // no urls, nothing to show.\r