Browse Source

AMBARI-17598 Permission mismatch b/w 'Cluster user' and 'read only user' from older ambari (zhewang)

Zhe (Joe) Wang 9 years ago
parent
commit
b261dbd5db

+ 2 - 0
ambari-web/app/templates/common/modal_popups/widget_browser_footer.hbs

@@ -17,9 +17,11 @@
 }}
 
 <div class="modal-footer">
+  {{#isAuthorized "SERVICE.MODIFY_CONFIGS"}}
     <label id="footer-checkbox">
       {{view Ember.Checkbox classNames="checkbox" checkedBinding="view.parentView.isShowMineOnly"}} &nbsp;
       {{t dashboard.widgets.browser.footer.checkbox}}
     </label>
+  {{/isAuthorized}}
   <button class="btn btn-success" {{action onPrimary target="view"}}>{{t common.close}}</button>
 </div>

+ 2 - 0
ambari-web/app/templates/common/modal_popups/widget_browser_popup.hbs

@@ -19,12 +19,14 @@
 <div id="widget-browser-popup">
   {{#if view.isLoaded}}
     <div class="widget-browser-content">
+      {{#isAuthorized "SERVICE.MODIFY_CONFIGS"}}
       <!--Create new widget button-->
         <div class="btn-group pull-right" id="create-widget-button">
           <button type="button" class="btn btn-primary" {{action "createWidget" target="view"}} >
             <i class="icon-plus"></i> &nbsp; {{t dashboard.widgets.create}}
           </button>
         </div>
+      {{/isAuthorized}}
 
       <!--Filters bar: service name filter, status filter here-->
       <ul id="services-filter-bar" class="nav nav-tabs">