Examples of AccessControlList


Examples of org.exoplatform.services.jcr.access.AccessControlList

      if (!isNodeType(Constants.EXO_PRIVILEGEABLE))
         throw new AccessControlException("Node is not exo:privilegeable " + getPath());

      checkPermission(PermissionType.CHANGE_PERMISSION);

      AccessControlList acl = new AccessControlList(getACL().getOwner(), getACL().getPermissionEntries());
      acl.removePermissions(identity, permission);
      setACL(acl);
      updatePermissions(acl);
   }
View Full Code Here

Examples of org.exoplatform.services.jcr.access.AccessControlList

         throw new RepositoryException("Permission cannot be null");
      }

      // check if changing permission allowed
      checkPermission(PermissionType.CHANGE_PERMISSION);
      AccessControlList acl = new AccessControlList(getACL().getOwner(), getACL().getPermissionEntries());
      acl.removePermissions(identity);
      acl.addPermissions(identity, permission);
      setACL(acl);
      updatePermissions(acl);
   }
View Full Code Here

Examples of org.exoplatform.services.jcr.access.AccessControlList

            AccessControlEntry ace = new AccessControlEntry(identity, perm[j]);
            aces.add(ace);
         }
      }

      AccessControlList acl = new AccessControlList(getACL().getOwner(), aces);
      setACL(acl);
      updatePermissions(acl);
   }
View Full Code Here

Examples of org.exoplatform.services.jcr.access.AccessControlList

      int orderNum = parentNode.getNextChildOrderNum();
      int index = parentNode.getNextChildIndex(name, parentNode.nodeData());

      QPath path = QPath.makeChildPath(parentNode.getInternalPath(), name, index);

      AccessControlList acl = parentNode.getACL();

      // create new nodedata, [PN] fix of use index as persisted version
      NodeData nodeData =
         new TransientNodeData(path, identifier, -1, primaryTypeName, mixinTypeNames, orderNum,
            parentNode.getInternalIdentifier(), acl);
View Full Code Here

Examples of org.exoplatform.services.jcr.access.AccessControlList

      {
         throw new VersionException("Node is aborted " + node.getQPath().getAsString());
      }
      else if (action == OnParentVersionAction.COPY)
      {
         AccessControlList acl =
            ntManager.isNodeType(Constants.EXO_PRIVILEGEABLE, node.getPrimaryTypeName(), node.getMixinTypeNames())
               ? node.getACL() : currentNode().getACL();

         QPath frozenPath = QPath.makeChildPath(currentNode().getQPath(), qname, node.getQPath().getIndex());
         frozenNode =
            new TransientNodeData(frozenPath, IdGenerator.generate(), node.getPersistedVersion(), node
               .getPrimaryTypeName(), node.getMixinTypeNames(), node.getOrderNumber(), currentNode().getIdentifier(), // parent
               acl);

         contextNodes.push(frozenNode);
         changesLog.add(ItemState.createAddedState(frozenNode));
      }
      else if (action == OnParentVersionAction.VERSION)
      {
         if (ntManager.isNodeType(Constants.MIX_VERSIONABLE, node.getPrimaryTypeName(), node.getMixinTypeNames()))
         {
            frozenNode =
               TransientNodeData.createNodeData(currentNode(), qname, Constants.NT_VERSIONEDCHILD, node.getQPath()
                  .getIndex());

            PropertyData pt =
               TransientPropertyData.createPropertyData(frozenNode, Constants.JCR_PRIMARYTYPE, PropertyType.NAME,
                  false, new TransientValueData(Constants.NT_VERSIONEDCHILD));

            ValueData vh =
               ((PropertyData)dataManager.getItemData(node, new QPathEntry(Constants.JCR_VERSIONHISTORY, 0),
                  ItemType.PROPERTY)).getValues().get(0);

            PropertyData pd =
               TransientPropertyData.createPropertyData(frozenNode, Constants.JCR_CHILDVERSIONHISTORY,
                  PropertyType.REFERENCE, false, vh);

            contextNodes.push(null);
            changesLog.add(ItemState.createAddedState(frozenNode));
            changesLog.add(ItemState.createAddedState(pt));
            changesLog.add(ItemState.createAddedState(pd));
         }
         else
         { // behaviour of COPY
            AccessControlList acl =
               ntManager.isNodeType(Constants.EXO_PRIVILEGEABLE, node.getPrimaryTypeName(), node.getMixinTypeNames())
                  ? node.getACL() : currentNode().getACL();

            QPath frozenPath = QPath.makeChildPath(currentNode().getQPath(), qname, node.getQPath().getIndex());
            frozenNode =
View Full Code Here

Examples of org.exoplatform.services.jcr.access.AccessControlList

   // Need for Externalizable
   // ------------------ [ BEGIN ] ------------------
   public TransientNodeData()
   {
      super();
      this.acl = new AccessControlList();
   }
View Full Code Here

Examples of org.exoplatform.services.jcr.access.AccessControlList

      for (String perm : PermissionType.ALL)
      {
         AccessControlEntry ace = new AccessControlEntry(SystemIdentity.ANY, perm);
         aces.add(ace);
      }
      AccessControlList acl = new AccessControlList(getACL().getOwner(), aces);

      setACL(acl);
   }
View Full Code Here

Examples of org.exoplatform.services.jcr.access.AccessControlList

      for (PropertyDefinitionData def : ntmanager.getAllPropertyDefinitions(type.getName()))
      {
         if (ntmanager.isNodeType(Constants.EXO_OWNEABLE, new InternalQName[]{type.getName()})
            && def.getName().equals(Constants.EXO_OWNER))
         {
            AccessControlList acl =
               new AccessControlList(session.getUserID(), ((NodeData)data).getACL().getPermissionEntries());
            setACL(acl);
         }
      }

      updateMixin(newMixin);
View Full Code Here

Examples of org.exoplatform.services.jcr.access.AccessControlList

      for (AccessControlEntry aEntry : nodeData().getACL().getPermissionEntries())
      {
         listEntry.add(new AccessControlEntry(aEntry.getIdentity(), aEntry.getPermission()));
      }

      return new AccessControlList(nodeData().getACL().getOwner(), listEntry);
   }
View Full Code Here

Examples of org.exoplatform.services.jcr.access.AccessControlList

         throw new AccessControlException("Node is not exo:privilegeable " + getPath());
      }

      checkPermission(PermissionType.CHANGE_PERMISSION);

      AccessControlList acl = new AccessControlList(getACL().getOwner(), getACL().getPermissionEntries());
      acl.removePermissions(identity);
      setACL(acl);
      updatePermissions(acl);
   }
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.