public void execute(Event<UISiteManagement> event) throws Exception {
UISiteManagement uicomp = event.getSource();
String portalName = event.getRequestContext().getRequestParameter(OBJECTID);
WebuiRequestContext context = event.getRequestContext();
UIApplication uiApplication = context.getUIApplication();
// Minh Hoang TO: User could edit navigation if he/she has edit permissions on PortalConfig. That is not
// at all logical and should be modified after release 3.1 GA
UserPortalConfigService configService = uicomp.getApplicationComponent(UserPortalConfigService.class);
UserPortalConfig userPortalConfig = configService.getUserPortalConfig(portalName, context.getRemoteUser(),
PortalRequestContext.USER_PORTAL_CONTEXT);
if (userPortalConfig == null) {
uiApplication.addMessage(new ApplicationMessage("UISiteManagement.msg.portal-not-exist",
new String[] { portalName }));
UIWorkingWorkspace uiWorkingWS = Util.getUIPortalApplication().getChildById(
UIPortalApplication.UI_WORKING_WS_ID);
uiWorkingWS.updatePortletsByName("UserToolbarSitePortlet");
return;
}
UserACL userACL = uicomp.getApplicationComponent(UserACL.class);
if (!userACL.hasEditPermission(userPortalConfig.getPortalConfig())) {
uiApplication.addMessage(new ApplicationMessage("UISiteManagement.msg.Invalid-editPermission", null));
return;
}
// Minh Hoang TO: For release 3.1, Edit Permission check would be rollback to former checks on PortalConfig
/*