diff options
author | Julien Lancelot <julien.lancelot@sonarsource.com> | 2014-08-11 11:50:20 +0200 |
---|---|---|
committer | Julien Lancelot <julien.lancelot@sonarsource.com> | 2014-08-11 11:50:28 +0200 |
commit | 0e52cad9c679bda4ba5bd2a1487d441a732d2d7b (patch) | |
tree | 9fd9a9c04efadd8e684cd25a3f1818f554fad174 /server/sonar-web/src/main/webapp | |
parent | f4f68fce0f7c2fbe9cc8ff08555327f2618e483a (diff) | |
download | sonarqube-0e52cad9c679bda4ba5bd2a1487d441a732d2d7b.tar.gz sonarqube-0e52cad9c679bda4ba5bd2a1487d441a732d2d7b.zip |
SONAR-5175 When deleting a group, rows related to this group in perm_templates_groups table should be deleted
Diffstat (limited to 'server/sonar-web/src/main/webapp')
-rw-r--r-- | server/sonar-web/src/main/webapp/WEB-INF/app/controllers/groups_controller.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/groups_controller.rb b/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/groups_controller.rb index 4322e4876f0..51a6a8063ba 100644 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/groups_controller.rb +++ b/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/groups_controller.rb @@ -75,8 +75,11 @@ class GroupsController < ApplicationController verify_post_request require_parameters :id group = Group.find(params[:id]) - if group.destroy - flash[:notice] = 'Group is deleted.' + call_backend do + Internal.permission_templates.removeGroupFromTemplates(group.name) + if group.destroy + flash[:notice] = 'Group is deleted.' + end end to_index(group.errors, nil) end |