瀏覽代碼

HUE-3190 [metastore] Hide refresh stats button if user does not have the permissions

Romain Rigaux 9 年之前
父節點
當前提交
ca764db552
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      apps/metastore/src/metastore/templates/metastore.mako

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

@@ -245,12 +245,14 @@ ${ assist.assistPanel() }
     <!-- ko with: tableDetails -->
     <h4>${ _('Stats') }
       <!-- ko ifnot: partition_keys.length -->
+        % if has_write_access:
         <!-- ko if: $parent.refreshingTableStats -->
         <i class="fa fa-refresh fa-spin"></i>
         <!-- /ko -->
         <!-- ko ifnot: $parent.refreshingTableStats() || is_view  -->
         <a class="pointer" href="javascript: void(0);" data-bind="click: $parent.refreshTableStats"><i class="fa fa-refresh"></i></a>
         <!-- /ko -->
+        % endif
         <span data-bind="visible: details.stats.COLUMN_STATS_ACCURATE == 'false' && ! is_view" rel="tooltip" data-placement="top" title="${ _('The column stats for this table are not accurate') }"><i class="fa fa-exclamation-triangle"></i></span>
       <!-- /ko -->
     </h4>