瀏覽代碼

AMBARI-4818. Do not show "restart" op on non-admin user. (Denys Buzhor via onechiporenko)

Oleg Nechiporenko 11 年之前
父節點
當前提交
c04360ddc3
共有 1 個文件被更改,包括 6 次插入4 次删除
  1. 6 4
      ambari-web/app/templates/main/host/summary.hbs

+ 6 - 4
ambari-web/app/templates/main/host/summary.hbs

@@ -47,13 +47,15 @@
         <div class="host-components">
         {{#if view.sortedComponents.length}}
 
-          {{#if view.content.componentsWithStaleConfigsCount}}
+          {{#if App.isAdmin}}
+            {{#if view.content.componentsWithStaleConfigsCount}}
               <div class="alert alert-warning clearfix">
                 <i class="icon-refresh"></i> {{view.needToRestartMessage}}
-                 <button {{bindAttr class=":btn :restart-components :pull-right :btn-warning"}} {{action restartAllStaleConfigComponents target="controller"}}>
-                  {{t hosts.host.details.needToRestart.button}}
-                 </button>
+                  <button {{bindAttr class=":btn :restart-components :pull-right :btn-warning"}} {{action restartAllStaleConfigComponents target="controller"}}>
+                    {{t hosts.host.details.needToRestart.button}}
+                  </button>
               </div>
+            {{/if}}
           {{/if}}
 
           {{#each component in view.sortedComponents}}