Examples of Identity


Examples of org.cyberneko.html.filters.Identity

    zazlPath = sb.toString();
    this.encoding = encoding;
    this.configScriptTag = configScriptTag;
    parser = new HTMLConfiguration();
        parser.setFeature(AUGMENTATIONS, true);
        XMLDocumentFilter[] filters = { this, new Identity(), new HTMLWriter(out, this.encoding) };
        parser.setProperty(FILTERS, filters);
  }
View Full Code Here

Examples of org.exolab.castor.persist.spi.Identity

    public void testLoadLaptopMulti() throws Exception {
        Database database = _category.getDatabase();
       
        database.begin();
        LaptopMulti laptop = (LaptopMulti) database.load(LaptopMulti.class,
                new Identity(new Integer (1), new Integer(1)));
        database.commit();
       
        assertNotNull(laptop);
        assertEquals("ctf.jdo.tc9x.LaptopMulti", laptop.getClass().getName());
        assertEquals("laptop 1", laptop.getName());
View Full Code Here

Examples of org.exoplatform.services.security.Identity

      return adminMSType;
   }

   public boolean hasPermission(PortalConfig pconfig)
   {
      Identity identity = getIdentity();
      if (hasPermission(identity, pconfig.getEditPermission()))
      {
         pconfig.setModifiable(true);
         return true;
      }
View Full Code Here

Examples of org.exoplatform.services.security.Identity

    * @param editPermExpression the permission expression
    * @return true or false
    */
   public boolean hasEditPermissionOnPortal(String ownerType, String ownerId, String editPermExpression)
   {
      Identity identity = this.getIdentity();
      if(superUser_.equals(identity.getUserId()))
      {
         return true;
      }
     
      if(PortalConfig.USER_TYPE.equals(ownerType)){
         return identity.getUserId().equals(ownerId);
      }
     
      return hasPermission(identity, editPermExpression);
   }
View Full Code Here

Examples of org.exoplatform.services.security.Identity

      return hasPermission(identity, editPermExpression);
   }

   public boolean hasCreatePortalPermission()
   {
      Identity identity = getIdentity();
      if (superUser_.equals(identity.getUserId()))
      {
         return true;
      }
      if (portalCreatorGroups_ == null || portalCreatorGroups_.size() < 1)
      {
View Full Code Here

Examples of org.exoplatform.services.security.Identity

      return false;
   }

   public boolean hasEditPermission(PageNavigation pageNav)
   {
      Identity identity = getIdentity();
      if (superUser_.equals(identity.getUserId()))
      {
         pageNav.setModifiable(true);
         return true;
      }
      String ownerType = pageNav.getOwnerType();
     
      if (PortalConfig.GROUP_TYPE.equals(ownerType))
      {
         String temp = pageNav.getOwnerId().trim();
         String expAdminGroup = getAdminGroups();
         String expPerm = null;

         // Check to see whether current user is member of admin group or not,
         // if so grant
         // edit permission for group navigation for that user.
         if (expAdminGroup != null)
         {
            expAdminGroup = expAdminGroup.startsWith("/") ? expAdminGroup : "/" + expAdminGroup;
            expPerm = temp.startsWith("/") ? temp : "/" + temp;
            if (isUserInGroup(expPerm) && isUserInGroup(expAdminGroup))
            {
               return true;
            }
         }

         expPerm = navigationCreatorMembershipType_ + (temp.startsWith("/") ? ":" + temp : ":/" + temp);
         return hasPermission(identity, expPerm);
      }
      else if (PortalConfig.USER_TYPE.equals(ownerType))
      {
         return pageNav.getOwnerId().equals(identity.getUserId());
      }
      return false;
   }
View Full Code Here

Examples of org.exoplatform.services.security.Identity

      return false;
   }

   public boolean hasPermission(Page page)
   {
      Identity identity = getIdentity();
      if (PortalConfig.USER_TYPE.equals(page.getOwnerType()))
      {
         if (page.getOwnerId().equals(identity.getUserId()))
         {
            page.setModifiable(true);
            return true;
         }
      }
      if (superUser_.equals(identity.getUserId()))
      {
         page.setModifiable(true);
         return true;
      }
      if (hasEditPermission(page))
View Full Code Here

Examples of org.exoplatform.services.security.Identity

      return false;
   }

   public boolean hasEditPermission(Page page)
   {
      Identity identity = getIdentity();
      if (PortalConfig.USER_TYPE.equals(page.getOwnerType()))
      {
         if (page.getOwnerId().equals(identity.getUserId()))
         {
            page.setModifiable(true);
            return true;
         }
         return false;
View Full Code Here

Examples of org.exoplatform.services.security.Identity

    * PortalDataMapper
    *
    */
   public boolean hasEditPermissionOnPage(String ownerType, String ownerId, String editPermExpression)
   {
      Identity identity = this.getIdentity();

      if (PortalConfig.USER_TYPE.equals(ownerType))
      {
         if (ownerId.equals(identity.getUserId()))
         {
            return true;
         }
         return false;
      }
View Full Code Here

Examples of org.exoplatform.services.security.Identity

    * @return
    */
   public boolean isUserInGroup(String group)
   {
      ConversationState conv = ConversationState.getCurrent();
      Identity id = null;
      if (conv != null)
      {
         id = conv.getIdentity();
      }

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

      Iterator<String> iter = id.getGroups().iterator();

      while (iter.hasNext())
      {
         if (iter.next().equals(group))
         {
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.