diff options
author | Grégoire Aubert <gregoire.aubert@sonarsource.com> | 2017-10-03 11:15:57 +0200 |
---|---|---|
committer | Grégoire Aubert <gregoire.aubert@sonarsource.com> | 2017-10-04 12:02:16 +0200 |
commit | e48a86bec9562c16c91b0f63468f22e16cb81b15 (patch) | |
tree | e20bf87cd9c022c4f59c2185316f67e87a06b6f3 /server/sonar-web/src | |
parent | 1b98f493116b447b4f8763399f19b6782ea8e741 (diff) | |
download | sonarqube-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.js | 5 |
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 { |