From: Grégoire Aubert Date: Tue, 3 Oct 2017 09:15:57 +0000 (+0200) Subject: SONAR-9550 Don't show the activate button for rules where there is no editable QP X-Git-Tag: 6.6-RC1~55 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=e48a86bec9562c16c91b0f63468f22e16cb81b15;p=sonarqube.git SONAR-9550 Don't show the activate button for rules where there is no editable QP --- 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 {