don't show Edit this Page if repository is private
authorDan Allen <dan@opendevise.com>
Mon, 18 Feb 2019 11:03:32 +0000 (04:03 -0700)
committerDan Allen <dan@opendevise.com>
Mon, 18 Feb 2019 11:03:32 +0000 (04:03 -0700)
preview-src/ui-model.yml
src/partials/toolbar.hbs

index 1aca0f2..69126ba 100644 (file)
@@ -60,6 +60,8 @@ page:
   module: ROOT
   home: false
   editUrl: http://example.com/project-xyz/blob/master/index.adoc
+  origin:
+    private: false
   breadcrumbs:
   - content: Quickstart
     url: '#'
index b4d427e..48fe56f 100644 (file)
@@ -5,7 +5,7 @@
   {{/if}}
 {{> breadcrumbs}}
 {{> page-versions}}
-  {{#if page.editUrl}}
+  {{#if (and page.editUrl (not page.origin.private))}}
   <div class="edit-this-page"><a href="{{page.editUrl}}">Edit this Page</a></div>
   {{/if}}
 </div>