Package org.exoplatform.portal.config

Examples of org.exoplatform.portal.config.UserACL


            String groupName = event.getRequestContext().getRequestParameter(OBJECTID);
            SiteKey siteKey = SiteKey.group(groupName);

            // check edit permission, ensure that user has edit permission on that
            // navigation
            UserACL userACL = uicomp.getApplicationComponent(UserACL.class);
            if (!userACL.hasEditPermissionOnNavigation(siteKey)) {
                uiApplication
                        .addMessage(new ApplicationMessage("UIGroupNavigationManagement.msg.Invalid-editPermission", null));
                return;
            }
View Full Code Here


        if (temp != null) {
            tempArrayList.addAll(temp.getAll());
        }

        // Get portals without edit permission
        UserACL userACL = getApplicationComponent(UserACL.class);
        Iterator<PortalConfig> iterPortals = tempArrayList.iterator();
        PortalConfig portalConfig;
        while (iterPortals.hasNext()) {
            portalConfig = iterPortals.next();
            if (!userACL.hasEditPermission(portalConfig)) {
                iterPortals.remove();
            }
        }

        this.pageList = new LazyPageList<PortalConfig>(new ListAccess<PortalConfig>() {
View Full Code Here

                        new String[] { defaultPortalName }, ApplicationMessage.WARNING));
                return;
            }

            DataStorage dataStorage = uicomp.getApplicationComponent(DataStorage.class);
            UserACL acl = uicomp.getApplicationComponent(UserACL.class);

            PortalConfig pConfig = dataStorage.getPortalConfig(portalName);
            if (pConfig != null) {
                if (acl.hasPermission(pConfig)) {
                    service.removeUserPortalConfig(portalName);
                } else {
                    uiPortalApp.addMessage(new ApplicationMessage("UISiteManagement.msg.Invalid-deletePermission",
                            new String[] { pConfig.getName() }));
                    return;
View Full Code Here

                        new String[] { portalName }));
                uiWorkingWS.updatePortletsByName("UserToolbarSitePortlet");
                return;
            }

            UserACL userACL = portalApp.getApplicationComponent(UserACL.class);
            if (!userACL.hasEditPermission(pConfig)) {
                portalApp.addMessage(new ApplicationMessage("UISiteManagement.msg.Invalid-editPermission",
                        new String[] { pConfig.getName() }));
                return;
            }
View Full Code Here

                        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
View Full Code Here

    private boolean hasEditPermissionOnPortal() {
        UIPortalApplication portalApp = Util.getUIPortalApplication();
        UIPortal currentUIPortal = portalApp.<UIWorkingWorkspace> findComponentById(UIPortalApplication.UI_WORKING_WS_ID)
                .findFirstComponentOfType(UIPortal.class);
        UserACL userACL = portalApp.getApplicationComponent(UserACL.class);
        return userACL.hasEditPermissionOnPortal(currentUIPortal.getSiteType().getName(), currentUIPortal.getName(),
                currentUIPortal.getEditPermission());
    }
View Full Code Here

        if (pageBody == null) {
            return false;
        }

        UIPage uiPage = (UIPage) pageBody.getUIComponent();
        UserACL userACL = portalApp.getApplicationComponent(UserACL.class);

        if (uiPage != null) {
            return userACL.hasEditPermissionOnPage(uiPage.getSiteKey().getTypeName(), uiPage.getSiteKey().getName(),
                    uiPage.getEditPermission());
        } else {
            UIPortal currentUIPortal = portalApp.<UIWorkingWorkspace> findComponentById(UIPortalApplication.UI_WORKING_WS_ID)
                    .findFirstComponentOfType(UIPortal.class);
            UserNode currentNode = currentUIPortal.getSelectedUserNode();
            PageKey pageKey = currentNode.getPageRef();
            if (pageKey == null) {
                return false;
            } else {
                PageService pageService = portalApp.getApplicationComponent(PageService.class);
                PageContext page = pageService.loadPage(pageKey);
                if (page == null) {
                    return false;
                } else {
                    return userACL.hasEditPermission(page);
                }
            }
        }
    }
View Full Code Here

            uiApp.addMessage(new ApplicationMessage("UIPageBrowser.msg.PageNotExist", null));
            return;
         }
         Page page = PortalDataMapper.toPageModel(uiPage);

         UserACL userACL = uiApp.getApplicationComponent(UserACL.class);
         if (!userACL.hasEditPermission(page))
         {
            uiApp.addMessage(new ApplicationMessage("UIPortalManagement.msg.Invalid-EditPage-Permission", null));
            return;
         }
View Full Code Here

   public void loadGroups() throws Exception
   {

      PortalRequestContext pContext = Util.getPortalRequestContext();
      UserPortalConfigService dataService = getApplicationComponent(UserPortalConfigService.class);
      UserACL userACL = getApplicationComponent(UserACL.class);
      OrganizationService orgService = getApplicationComponent(OrganizationService.class);
      List<String> listGroup = null;
      // get all group that user has permission
      if (userACL.isUserInGroup(userACL.getAdminGroups()) && !userACL.getSuperUser().equals(pContext.getRemoteUser()))
      {
         Collection<?> temp = (List)orgService.getGroupHandler().findGroupsOfUser(pContext.getRemoteUser());
         if (temp != null)
         {
            listGroup = new ArrayList<String>();
View Full Code Here

      }
     
      private boolean hasPageCreationPermission() throws Exception
      {
         UIPortal currentPortal = Util.getUIPortal();
         UserACL userACL = Util.getUIPortalApplication().getApplicationComponent(UserACL.class);
         PageNavigation selectedNavigation = currentPortal.getSelectedNavigation();
         if (PortalConfig.PORTAL_TYPE.equals(selectedNavigation.getOwnerType()))
         {
            return userACL.hasEditPermissionOnPortal(currentPortal.getOwnerType(), currentPortal.getOwner(), currentPortal.getEditPermission());
         }
        
         return userACL.hasEditPermission(selectedNavigation);
      }
View Full Code Here

TOP

Related Classes of org.exoplatform.portal.config.UserACL

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.