Browse Source

HUE-3165 [metastore] Do not show load data button when missing write permission

Romain Rigaux 9 years ago
parent
commit
440fcce5b0
1 changed files with 2 additions and 0 deletions
  1. 2 0
      apps/metastore/src/metastore/templates/metastore.mako

+ 2 - 0
apps/metastore/src/metastore/templates/metastore.mako

@@ -462,7 +462,9 @@ ${ assist.assistPanel() }
     <!-- ko with: database -->
     <!-- ko with: table -->
 ##     <a class="inactive-action margin-left-10" href="javascript: void(0);"><i class="fa fa-star"></i></a>
+    % if has_write_access:
     <a class="inactive-action margin-left-10" href="#" data-bind="click: showImportData" title="${_('Import Data')}"><i class="fa fa-upload"></i></a>
+    % endif
     <a class="inactive-action margin-left-10" data-bind="attr: { 'href': '/notebook/browse/' + database.name + '/' + name }" title="${_('Browse Data')}"><i class="fa fa-list"></i></a>
     % if has_write_access:
       <a class="inactive-action margin-left-10" href="#dropSingleTable" data-toggle="modal" data-bind="attr: { 'title' : tableDetails() && tableDetails().is_view ? '${_('Drop View')}' : '${_('Drop Table')}' }"><i class="fa fa-times"></i></a>