Author: kien_nguyen
Date: 2010-04-21 23:51:19 -0400 (Wed, 21 Apr 2010)
New Revision: 2741
Modified:
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/workspace/UIMainActionListener.java
Log:
GTNPORTAL-1077 Show message alert You have no right to edit this layout. when edit layout
of Dashboard with user [john/demo/mary]
Modified:
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/workspace/UIMainActionListener.java
===================================================================
---
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/workspace/UIMainActionListener.java 2010-04-22
03:13:13 UTC (rev 2740)
+++
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/workspace/UIMainActionListener.java 2010-04-22
03:51:19 UTC (rev 2741)
@@ -141,15 +141,20 @@
if (userConfig == null)
userConfig = uiApp.getUserPortalConfig();
- PortalConfig portalConfig = userConfig.getPortalConfig();
-
- UserACL userACL = uiPortal.getApplicationComponent(UserACL.class);
- if (!userACL.hasEditPermission(portalConfig))
+ //Todo nguyenanhkien2a(a)gmail.com
+ //Check editing permission
+ UIPortalApplication portalApp = Util.getUIPortalApplication();
+ UIPortal currentUIPortal =
portalApp.<UIWorkingWorkspace>findComponentById(
+
UIPortalApplication.UI_WORKING_WS_ID).findFirstComponentOfType(UIPortal.class);
+ UserACL userACL = portalApp.getApplicationComponent(UserACL.class);
+ if(!userACL.hasEditPermissionOnPortal(currentUIPortal.getOwnerType(),
currentUIPortal.getOwner(),
+ currentUIPortal.getEditPermission()))
{
uiApp.addMessage(new
ApplicationMessage("UIPortalManagement.msg.Invalid-EditLayout-Permission",
new String[]{uiPortal.getName()}));
return;
}
+
PortalRequestContext pcontext =
(PortalRequestContext)event.getRequestContext();
UIWorkingWorkspace uiWorkingWS =
uiApp.getChildById(UIPortalApplication.UI_WORKING_WS_ID);
uiWorkingWS.setBackupUIPortal(uiPortal);
Show replies by date