From 42d098015ceadafb673aaf3f12c718c00e52b857 Mon Sep 17 00:00:00 2001 From: Julien Lancelot Date: Tue, 5 Aug 2014 15:21:25 +0200 Subject: SONAR-4963 Return group description in /user_groups/search --- .../WEB-INF/app/controllers/user_groups_controller.rb | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'server/sonar-web') diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/user_groups_controller.rb b/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/user_groups_controller.rb index 90cd2dc0ec8..94a4671a614 100644 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/user_groups_controller.rb +++ b/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/user_groups_controller.rb @@ -33,11 +33,15 @@ class UserGroupsController < ApplicationController format.json { render :json => { :more => more, - :results => groups.map { |group| { - :id => group.id(), - :name => group.name(), - :selected => group.isMember() - }} + :results => groups.map { |group| + hash = { + :id => group.id(), + :name => group.name(), + :selected => group.isMember() + } + hash[:description] = group.description() if group.description() && !group.description().blank? + hash + } } } end -- cgit v1.2.3