]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-8367 The "Apply Template" button should be displayed only to system administrators
authorStas Vilchik <vilchiks@gmail.com>
Tue, 15 Nov 2016 14:25:53 +0000 (15:25 +0100)
committerStas Vilchik <vilchiks@gmail.com>
Tue, 15 Nov 2016 14:25:53 +0000 (15:25 +0100)
server/sonar-web/src/main/js/apps/permissions/project/components/PageHeader.js

index 39fcaa5e925ae77d63a8d51ba61fed260cbc9ca1..db60031625d7597e7ca32d5b8b30a609196d64a7 100644 (file)
@@ -59,13 +59,13 @@ class PageHeader extends React.Component {
               <i className="spinner"/>
           )}
 
-          <div className="page-actions">
-            <button
-                className="js-apply-template"
-                onClick={this.handleApplyTemplate}>
-              Apply Template
-            </button>
-          </div>
+          {!!window.SS.isUserAdmin && (
+              <div className="page-actions">
+                <button className="js-apply-template" onClick={this.handleApplyTemplate}>
+                  Apply Template
+                </button>
+              </div>
+          )}
 
           <div className="page-description">
             {translate('roles.page.description2')}