Package org.exoplatform.portal.config

Examples of org.exoplatform.portal.config.UserACL


         //Todo nguyenanhkien2a@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;
View Full Code Here


   {
      public void execute(Event<UIWorkingWorkspace> event) throws Exception
      {
         PortalRequestContext prContext = Util.getPortalRequestContext();
         UIPortalApplication uiApp = event.getSource().getAncestorOfType(UIPortalApplication.class);
         UserACL userACL = uiApp.getApplicationComponent(UserACL.class);
         if (!userACL.hasCreatePortalPermission())
         {
            uiApp.addMessage(new ApplicationMessage("UIPortalBrowser.msg.Invalid-createPermission", null));
            return;
         }
         UIMaskWorkspace uiMaskWS = uiApp.getChildById(UIPortalApplication.UI_MASK_WS_ID);
View Full Code Here

            pcontext.addUIComponentToUpdateByAjax(uiPortalApp.getUIPopupMessages());
            return;
         }

         //Check current user 's permissions on the page
         UserACL userACL = uiPageBrowser.getApplicationComponent(UserACL.class);
         if (!userACL.hasEditPermission(page))
         {
            uiPortalApp.addMessage(new ApplicationMessage("UIPageBrowser.msg.edit.NotEditPage", new String[]{id}, 1));
            pcontext.addUIComponentToUpdateByAjax(uiPortalApp.getUIPopupMessages());
            return;
         }
View Full Code Here

            if(!isSystemNode)
            {
               return false;
            }else
            {
               UserACL userACL = context.getUIApplication().getApplicationComponent(UserACL.class);
               return !userACL.getSuperUser().equals(context.getRemoteUser());
            }
           
         }
      };
      this.getChild(UIFilterableTree.class).setTreeNodeFilter(nodeFilter);
View Full Code Here

      ownerTypes.add(new SelectItemOption<String>(PortalConfig.USER_TYPE));

      UserPortalConfig userPortalConfig =
         configService.getUserPortalConfig(pcontext.getPortalOwner(), pcontext.getRemoteUser());
      ExoContainer container = ExoContainerContext.getCurrentContainer();
      UserACL acl = (UserACL)container.getComponentInstanceOfType(UserACL.class);
      if (acl.hasEditPermission(userPortalConfig.getPortalConfig()))
      {
         ownerTypes.add(new SelectItemOption<String>(PortalConfig.PORTAL_TYPE));
      }
      ownerIdInput = new UIFormStringInput(OWNER_ID, OWNER_ID, null);
      ownerIdInput.setEditable(false).setValue(pcontext.getRemoteUser());
View Full Code Here

      if (!PortalConfig.USER_TYPE.equals(page.getOwnerType()))
      {
         page.setAccessPermissions(uiPermissionSetting.getChild(UIListPermissionSelector.class).getValue());
         page.setEditPermission(uiPermissionSetting.getChild(UIPermissionSelector.class).getValue());
      }
      UserACL userACL = getApplicationComponent(UserACL.class);
      userACL.hasPermission(page);

      UIFormInputItemSelector uiTemplate = getChildById("Template");
      if (uiTemplate != null)
      {
         SelectItemOption<?> itemOption = uiTemplate.getSelectedItemOption();
View Full Code Here

         // get selected page
         String pageId = selectedPageNode.getPageReference();
         Page selectPage = (pageId != null) ? userService.getPage(pageId) : null;
         if (selectPage != null)
         {
            UserACL userACL = uiApp.getApplicationComponent(UserACL.class);
            if (!userACL.hasEditPermission(selectPage))
            {
               uiApp.addMessage(new ApplicationMessage("UIPageBrowser.msg.UserNotPermission", new String[]{pageId}, 1));
               return;
            }
View Full Code Here

         UserPortalConfigService service = uiApp.getApplicationComponent(UserPortalConfigService.class);
         Page node = (pageId != null) ? service.getPage(pageId) : null;
         if (node != null)
         {
            UserACL userACL = uiApp.getApplicationComponent(UserACL.class);
            if (!userACL.hasPermission(node))
            {
               uiApp.addMessage(new ApplicationMessage("UIPageBrowser.msg.UserNotPermission", new String[]{pageId}, 1));;
               return;
            }
         }
View Full Code Here

               list.add(2, uiForm.groupIdSelectBox);
               String groupIdSelected = uiForm.groupIdSelectBox.getValue();
               groupIdSelected = groupIdSelected.startsWith("/") ? groupIdSelected : "/" + groupIdSelected;
               String permission = "*:" + groupIdSelected;
               uiForm.findFirstComponentOfType(UIListPermissionSelector.class).setValue(new String[]{permission});
               UserACL userACL = uiForm.getApplicationComponent(UserACL.class);
               permission = userACL.getMakableMT() + ":" + groupIdSelected;
               uiForm.findFirstComponentOfType(UIPermissionSelector.class).setValue(permission);
            }
         }
         prContext.addUIComponentToUpdateByAjax(uiForm.getParent());
      }
View Full Code Here

         UIPageForm uiForm = event.getSource();
         String groupIdSelected = uiForm.groupIdSelectBox.getValue();
         groupIdSelected = groupIdSelected.startsWith("/") ? groupIdSelected : "/" + groupIdSelected;
         String permission = "*:" + groupIdSelected;
         uiForm.findFirstComponentOfType(UIListPermissionSelector.class).setValue(new String[]{permission});
         UserACL userACL = uiForm.getApplicationComponent(UserACL.class);        
         permission = userACL.getMakableMT() + ":" + groupIdSelected;
         uiForm.findFirstComponentOfType(UIPermissionSelector.class).setValue(permission);
         event.getRequestContext().addUIComponentToUpdateByAjax(uiForm.getParent());
      }
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.