Examples of UserACL


Examples of org.exoplatform.portal.config.UserACL

      public void execute(Event<UIListUsers> event) throws Exception
      {
         UIListUsers uiListUser = event.getSource();
         String userName = event.getRequestContext().getRequestParameter(OBJECTID);
         OrganizationService service = uiListUser.getApplicationComponent(OrganizationService.class);
         UserACL userACL = uiListUser.getApplicationComponent(UserACL.class);
         if (userACL.getSuperUser().equals(userName))
         {
            UIApplication uiApp = event.getRequestContext().getUIApplication();
            uiApp.addMessage(new ApplicationMessage("UIListUsers.msg.DeleteSuperUser", new String[]{userName},
               ApplicationMessage.WARNING));
            return;
View Full Code Here

Examples of org.exoplatform.portal.config.UserACL

         {
            uiApp.addMessage(new ApplicationMessage("UIGroupManagement.msg.Delete", null));
            return;
         }
         OrganizationService service = uiGroupManagement.getApplicationComponent(OrganizationService.class);
         UserACL acl = uiGroupManagement.getApplicationComponent(UserACL.class);
         List<String> mandatories = acl.getMandatoryGroups();
         if (!mandatories.isEmpty() && isMandatory(service.getGroupHandler(), currentGroup, mandatories))
         {
            uiApp.addMessage(new ApplicationMessage("UIGroupManagement.msg.DeleteMandatory", null));
            return;
         }
View Full Code Here

Examples of org.exoplatform.portal.config.UserACL

            uiApp.addMessage(new ApplicationMessage("UIMembershipList.msg.InUse", null));
            return;
         }

         //  Check to see whether given membershiptype is mandatory or not
         UserACL acl = uiMembership.getApplicationComponent(UserACL.class);
         List<String> mandatories = acl.getMandatoryMSTypes();
         if (!mandatories.isEmpty() && mandatories.contains(name))
         {
            UIApplication uiApp = event.getRequestContext().getUIApplication();
            uiApp.addMessage(new ApplicationMessage("UIMembershipList.msg.DeleteMandatory", null));
            return;
View Full Code Here

Examples of org.exoplatform.portal.config.UserACL

   private boolean hasEditPermissionOnNavigation() throws Exception
   {
      PageNavigation selectedNavigation = getSelectedNavigation();
      UIPortalApplication portalApp = Util.getUIPortalApplication();
      UserACL userACL = portalApp.getApplicationComponent(UserACL.class);
      if (selectedNavigation == null || userACL == null)
      {
         return false;
      }
      else
      {
         if (PortalConfig.PORTAL_TYPE.equals(selectedNavigation.getOwnerType()))
         {
            return hasEditPermissionOnPortal();
         }
         return userACL.hasEditPermission(selectedNavigation);
      }
   }
View Full Code Here

Examples of org.exoplatform.portal.config.UserACL

  
   private boolean hasEditPermissionOnPortal() throws Exception
   {
      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.getOwnerType(), currentUIPortal.getOwner(), currentUIPortal.getEditPermission());
   }
View Full Code Here

Examples of org.exoplatform.portal.config.UserACL

   {
      UIPortalApplication portalApp = Util.getUIPortalApplication();
      UIWorkingWorkspace uiWorkingWS = portalApp.getChildById(UIPortalApplication.UI_WORKING_WS_ID);
      UIPageBody pageBody = uiWorkingWS.findFirstComponentOfType(UIPageBody.class);
      UIPage uiPage = (UIPage)pageBody.getUIComponent();
      UserACL userACL = portalApp.getApplicationComponent(UserACL.class);

      if(uiPage != null)
      {
         return userACL.hasEditPermissionOnPage(uiPage.getOwnerType(), uiPage.getOwnerId(), uiPage.getEditPermission());
      }
      else
      {
         UIPortal currentUIPortal = portalApp.<UIWorkingWorkspace>findComponentById(UIPortalApplication.UI_WORKING_WS_ID).findFirstComponentOfType(UIPortal.class);
         PageNode currentNode = currentUIPortal.getSelectedNode();
         String pageReference = currentNode.getPageReference();
         if(pageReference == null)
         {
            return false;
         }
         else
         {
            DataStorage dataStorage = portalApp.getApplicationComponent(DataStorage.class);
            Page page = dataStorage.getPage(pageReference);
            if(page == null)
            {
               return false;
            }
            else
            {
               return userACL.hasEditPermission(page);
            }
         }
      }
   }
View Full Code Here

Examples of org.exoplatform.portal.config.UserACL

      UserACLMetaData md = new UserACLMetaData();
      md.setSuperUser("root");
      md.setGuestsGroups("/platform/guests");
      md.setPortalCreateGroups("*:/platform/administrators,*:/organization/management/executive-board");
      md.setNavigationCreatorMembershipType("manager");
      UserACL ua = new UserACL(md);
      User root = new User("root");
      User administrator = new User("administrator");
      administrator.addMembership("whatever", "/platform/administrators");
      User manager = new User("manager");
      manager.addMembership("manager", "/manageable");
View Full Code Here

Examples of org.exoplatform.portal.config.UserACL

                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

Examples of org.exoplatform.portal.config.UserACL

            } else {
                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

Examples of org.exoplatform.portal.config.UserACL

            String id = event.getRequestContext().getRequestParameter(OBJECTID);
            WebuiRequestContext ctx = event.getRequestContext();
            UIApplication uiApp = ctx.getUIApplication();
            UIPageSelector uiPageSelector = uiPageBrowser.getAncestorOfType(UIPageSelector.class);
            UserPortalConfigService service = uiPageBrowser.getApplicationComponent(UserPortalConfigService.class);
            UserACL userACL = uiPageBrowser.getApplicationComponent(UserACL.class);
            if (!userACL.hasPermission(service.getPageService().loadPage(PageKey.parse(id)))) {
                uiApp.addMessage(new ApplicationMessage("UIPageBrowser.msg.NoPermission", new String[] { id }));
            }
            uiPageSelector.setValue(id);
            // uiPageBrowser.feedDataWithQuery(null);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.