diff options
Diffstat (limited to 'server')
-rw-r--r-- | server/sonar-web/src/main/coffee/coding-rules/views/header-view.coffee | 5 | ||||
-rw-r--r-- | server/sonar-web/src/main/hbs/coding-rules/coding-rules-header.hbs | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/server/sonar-web/src/main/coffee/coding-rules/views/header-view.coffee b/server/sonar-web/src/main/coffee/coding-rules/views/header-view.coffee index b3554347edf..caa03b54779 100644 --- a/server/sonar-web/src/main/coffee/coding-rules/views/header-view.coffee +++ b/server/sonar-web/src/main/coffee/coding-rules/views/header-view.coffee @@ -21,3 +21,8 @@ define [ createRule: -> @options.app.createManualRule() + + + serializeData: -> + _.extend super, + 'canWrite': @options.app.canWrite diff --git a/server/sonar-web/src/main/hbs/coding-rules/coding-rules-header.hbs b/server/sonar-web/src/main/hbs/coding-rules/coding-rules-header.hbs index 12fbc46ac5c..6f539db926b 100644 --- a/server/sonar-web/src/main/hbs/coding-rules/coding-rules-header.hbs +++ b/server/sonar-web/src/main/hbs/coding-rules/coding-rules-header.hbs @@ -2,5 +2,5 @@ <div class="navigator-header-actions button-group"> <button id="coding-rules-new-search">{{t 'coding_rules.new_search'}}</button> - <button id="coding-rules-create-rule">{{t 'coding_rules.create'}}</button> + {{#if canWrite}}<button id="coding-rules-create-rule">{{t 'coding_rules.create'}}</button>{{/if}} </div> |