Author: hoang_to
Date: 2010-02-02 22:54:05 -0500 (Tue, 02 Feb 2010)
New Revision: 1502
Modified:
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIUserInGroup.java
Log:
GTNPORTAL-504: Don't show Edit/Delete actions in group info in User and Group
management portlet
Modified:
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIUserInGroup.java
===================================================================
---
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIUserInGroup.java 2010-02-02
23:36:41 UTC (rev 1501)
+++
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIUserInGroup.java 2010-02-03
03:54:05 UTC (rev 1502)
@@ -21,6 +21,7 @@
import org.exoplatform.commons.utils.EmptySerializablePageList;
import org.exoplatform.commons.utils.PageList;
+import org.exoplatform.portal.webui.util.Util;
import org.exoplatform.services.organization.Group;
import org.exoplatform.services.organization.Membership;
import org.exoplatform.services.organization.MembershipHandler;
@@ -146,9 +147,12 @@
if (group != null)
{
String groupId = group.getId();
- // show action if is administrator
- boolean showAction = GroupManagement.isAdministrator(null);
+ String currentUser = Util.getPortalRequestContext().getRemoteUser();
+ // show action if user is administrator or manager of current group
+ boolean showAction =
+ GroupManagement.isAdministrator(currentUser) ||
GroupManagement.isManagerOfGroup(currentUser, groupId);
+
if (!showAction)
{
pageList.setPageSize(10);
Show replies by date