Author: hoang_to
Date: 2010-01-14 00:59:09 -0500 (Thu, 14 Jan 2010)
New Revision: 1277
Modified:
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/config/UserACL.java
Log:
GTNPORTAL-466: Fix error in checking edit permission
Modified:
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/config/UserACL.java
===================================================================
---
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/config/UserACL.java 2010-01-14
04:27:54 UTC (rev 1276)
+++
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/config/UserACL.java 2010-01-14
05:59:09 UTC (rev 1277)
@@ -42,6 +42,8 @@
{
public final static String EVERYONE = "Everyone";
+ public final static String MANAGER = "manager";
+
protected static Log log = ExoLogger.getLogger("organization:UserACL");
private final Collection<MembershipEntry> NO_MEMBERSHIP =
Collections.emptyList();
@@ -410,8 +412,18 @@
return true;
}
String ownerType = pageNav.getOwnerType();
- if (PortalConfig.GROUP_TYPE.equals(ownerType))
+
+ if(PortalConfig.PORTAL_TYPE.equals(ownerType))
{
+ //For portal navigation, only manager of admin group has edit permission
+ String adminGroup = getAdminGroups();
+ if(adminGroup == null){
+ return false;
+ }
+ return identity.isMemberOf(adminGroup, UserACL.MANAGER);
+ }
+ else if (PortalConfig.GROUP_TYPE.equals(ownerType))
+ {
String temp = pageNav.getOwnerId().trim();
String expAdminGroup = getAdminGroups();
String expPerm = null;
@@ -438,7 +450,7 @@
}
return false;
}
-
+
private boolean hasPermission(Identity identity, Page page)
{
if (PortalConfig.USER_TYPE.equals(page.getOwnerType()))
Show replies by date