}
@PreAuthorize("isDomainAdmin() or hasRole('ROLE_ADMIN')")
@RequestMapping(value = "/manager/getGroupsForUser", method = RequestMethod.GET)
public @ResponseBody List<GroupModel> getGroupsForUser() {
User user = userService.getUserFromSecurityContext();
List<GroupModel> models = new ArrayList<GroupModel>();
for (Group group : userService.getAdministeredGroups(user, SortOrder.ASCENDING)) {
models.add(groupService.createGroupModelWithOrganization(group, false, false));