Quellcode durchsuchen

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

Oleg Nechiporenko vor 11 Jahren
Ursprung
Commit
c04360ddc3
1 geänderte Dateien mit 6 neuen und 4 gelöschten Zeilen
  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}}