Skip to content

Commit

Permalink
LPS-27390 Made scope selection working at Site Membership porltet's t…
Browse files Browse the repository at this point in the history
…abs' navigation
  • Loading branch information
Vilmos Papp authored and KocsisDaniel committed May 21, 2012
1 parent 1221eae commit 823815c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
Expand Up @@ -129,12 +129,18 @@ public static Group getGroup(HttpServletRequest request) throws Exception {

String cmd = ParamUtil.getString(request, Constants.CMD);

long doAsGroupId = ParamUtil.getLong(request, "doAsGroupId");
long groupId = ParamUtil.getLong(request, "groupId");

Group group = null;

if (groupId > 0) {
group = GroupLocalServiceUtil.getGroup(groupId);
if ((doAsGroupId != 0) && (doAsGroupId != groupId)) {
group = GroupLocalServiceUtil.getGroup(doAsGroupId);
}
else {
group = GroupLocalServiceUtil.getGroup(groupId);
}
}
else if (!cmd.equals(Constants.ADD)) {
group = themeDisplay.getScopeGroup();
Expand Down
8 changes: 6 additions & 2 deletions portal-web/docroot/html/portlet/sites_admin/view_teams.jsp
Expand Up @@ -20,9 +20,13 @@
String redirect = ParamUtil.getString(request, "redirect");
String backURL = ParamUtil.getString(request, "backURL", redirect);
long groupId = ParamUtil.getLong(request, "groupId");
Group group = (Group)request.getAttribute(WebKeys.GROUP);
Group group = GroupServiceUtil.getGroup(groupId);
if (group == null) {
group = themeDisplay.getScopeGroup();
}
long groupId = group.getGroupId();
Organization organization = null;
Expand Down

0 comments on commit 823815c

Please sign in to comment.