aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src
diff options
context:
space:
mode:
authorGrégoire Aubert <gregoire.aubert@sonarsource.com>2017-10-03 11:15:57 +0200
committerGrégoire Aubert <gregoire.aubert@sonarsource.com>2017-10-04 12:02:16 +0200
commite48a86bec9562c16c91b0f63468f22e16cb81b15 (patch)
treee20bf87cd9c022c4f59c2185316f67e87a06b6f3 /server/sonar-web/src
parent1b98f493116b447b4f8763399f19b6782ea8e741 (diff)
downloadsonarqube-e48a86bec9562c16c91b0f63468f22e16cb81b15.tar.gz
sonarqube-e48a86bec9562c16c91b0f63468f22e16cb81b15.zip
SONAR-9550 Don't show the activate button for rules where there is no editable QP
Diffstat (limited to 'server/sonar-web/src')
-rw-r--r--server/sonar-web/src/main/js/apps/coding-rules/rule/rule-profiles-view.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/server/sonar-web/src/main/js/apps/coding-rules/rule/rule-profiles-view.js b/server/sonar-web/src/main/js/apps/coding-rules/rule/rule-profiles-view.js
index 81781afab8b..25658dd0deb 100644
--- a/server/sonar-web/src/main/js/apps/coding-rules/rule/rule-profiles-view.js
+++ b/server/sonar-web/src/main/js/apps/coding-rules/rule/rule-profiles-view.js
@@ -85,9 +85,10 @@ export default Marionette.CompositeView.extend({
},
serializeData() {
- // show "Activate" button only if user has at least one QP which he administates
+ // show "Activate" button only if user has at least one QP of the same language which he administates
+ const ruleLang = this.model.get('lang');
const canActivate = this.options.app.qualityProfiles.some(
- profile => profile.actions && profile.actions.edit
+ profile => profile.actions && profile.actions.edit && profile.language === ruleLang
);
return {