Package org.exoplatform.portal.config

Examples of org.exoplatform.portal.config.UserACL$Permission


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

      UserACL userACL = this.getApplicationComponent(UserACL.class);
      if (userACL.isUserInGroup(userACL.getAdminGroups()))
      {
         return true;
      }

      OrganizationService orgService = this.getApplicationComponent(OrganizationService.class);
      try
      {
         Collection<?> groups = orgService.getGroupHandler().findGroupByMembership(remoteUser, userACL.getMakableMT());
         if (groups != null && groups.size() > 0)
         {
            return true;
         }
         else
View Full Code Here


         WebuiRequestContext context = event.getRequestContext();
         UIApplication uiApplication = context.getUIApplication();

         // check edit permission, ensure that user has edit permission on that
         // navigation
         UserACL userACL = uicomp.getApplicationComponent(UserACL.class);

         if (!userACL.hasEditPermission(navigation))
         {
            uiApplication.addMessage(new ApplicationMessage("UIGroupNavigationManagement.msg.Invalid-editPermission", null));
            return;
         }
View Full Code Here

         // get PageNavigation by navigation id
         PageNavigation navigation = uicomp.getNavigationById(navId);

         // check edit permission, ensure that user has edit permission on that
         // navigation
         UserACL userACL = uicomp.getApplicationComponent(UserACL.class);

         if (!userACL.hasEditPermission(navigation))
         {
            uiApplication.addMessage(new ApplicationMessage("UIGroupNavigationManagement.msg.Invalid-editPermission", null));
            return;
         }
View Full Code Here

               new String[]{portalName}));
            return;
         }
         PortalConfig portalConfig = userConfig.getPortalConfig();

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

            uiApplication.addMessage(new ApplicationMessage("UISiteManagement.msg.portal-not-exist",
               new String[]{portalName}));
            return;
         }
        
         UserACL userACL = uicomp.getApplicationComponent(UserACL.class);
         if (!userACL.hasEditPermission(userPortalConfig.getPortalConfig()))
         {
            uiApplication.addMessage(new ApplicationMessage("UISiteManagement.msg.Invalid-editPermission", null));;
            return;
         }
        
View Full Code Here

      {
         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();
         }
      }
View Full Code Here

   {
      ApplicationRegistryService service = getApplicationComponent(ApplicationRegistryService.class);
      String remoteUser = Util.getPortalRequestContext().getRemoteUser();
      if (remoteUser == null || remoteUser.equals(""))
         return;
      UserACL userACL = Util.getUIPortalApplication().getApplicationComponent(UserACL.class);

      PortletComparator portletComparator = new PortletComparator();
      categories = service.getApplicationCategories(remoteUser);

      Iterator<ApplicationCategory> cateItr = categories.iterator();
      while (cateItr.hasNext())
      {
         ApplicationCategory cate = cateItr.next();
         List<Application> applications = cate.getApplications();
         boolean hasPermission = false;
         List<String> accessPermission = cate.getAccessPermissions();
         if (accessPermission == null)
         {
            accessPermission = new ArrayList<String>();
         }
         if (accessPermission.size() == 0)
         {
            accessPermission.add(null);
         }
         for (String permssion : accessPermission)
         {
            hasPermission = userACL.hasPermission(permssion);
            if (hasPermission)
               break;
         }

         if (!hasPermission || applications.size() < 1)
View Full Code Here

                  return;
               }
            }
         }

         UserACL userACL = uiForm.getApplicationComponent(UserACL.class);

         String ownerId = uiForm.getOwner();
         String[] accessPermission = new String[1];
         accessPermission[0] = "*:" + ownerId;
         String editPermission = userACL.getMakableMT() + ":" + ownerId;
        
         if (PortalConfig.PORTAL_TYPE.equals(uiForm.getOwnerType()))
         {
            UIPortal uiPortal = Util.getUIPortal();
            accessPermission = uiPortal.getAccessPermissions();
            editPermission = uiPortal.getEditPermission();
         }
        
        
         UIFormStringInput uiPageName = uiInputSet.getChildById("pageName");
         UIFormStringInput uiPageTitle = uiInputSet.getChildById("pageTitle");

         Page page = new Page();
         page.setOwnerType(uiForm.getOwnerType());
         page.setOwnerId(ownerId);
         page.setName(uiPageName.getValue());
         String title = uiPageTitle.getValue();;
         if (title == null || title.trim().length() < 1)
            title = page.getName();
         page.setTitle(title);

         page.setShowMaxWindow(false);

         page.setAccessPermissions(accessPermission);
         page.setEditPermission(editPermission);

         userACL.hasPermission(page);

         page.setModifiable(true);
         if (page.getChildren() == null)
            page.setChildren(new ArrayList<ModelObject>());

View Full Code Here

            String pageRef = node.getPageReference();
            DataStorage storage = portal.getApplicationComponent(DataStorage.class);
            Page page = storage.getPage(pageRef);
            if (page != null)
            {
               UserACL userACL = portal.getApplicationComponent(UserACL.class);
               return userACL.hasPermission(page);
            }
         }
      }
      catch (Exception e)
      {
View Full Code Here

      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

TOP

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

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.