Examples of ACL


Examples of com.github.sardine.model.Acl

    {
      return null;
    }
    for (Propstat propstat : list)
    {
      Acl a = propstat.getProp().getAcl();
      if (a != null && a.getAce() != null)
      {
        for (Ace ace : a.getAce())
        {
          result.add(new DavAce(ace));
        }
      }
    }
View Full Code Here

Examples of com.google.code.com.sun.mail.imap.ACL

        String name = null;
        while ((name = ir.readAtomString()) != null) {
      String rights = ir.readAtomString();
      if (rights == null)
          break;
      ACL acl = new ACL(name, new Rights(rights));
      v.addElement(acl);
        }
        r[i] = null;
    }
      }
View Full Code Here

Examples of com.google.feedserver.resource.Acl

  /**
   * Empty authorized entities.  Add one principal with one operation.  Should get one authorized
   * entity with one principal.
   */
  public void testAddAcl0() {
    Acl acl = new Acl("acl0", new ResourceInfo("resourceRule0", ResourceInfo.RESOURCE_TYPE_FEED), null);
    aclTool.addAcl(Arrays.asList(acl), 'r', USER9);

    assertEquals(1, acl.getAuthorizedEntities().length);
    assertAuthorizedEntityEquals(authorizedEntity_r_9, acl.getAuthorizedEntities()[0]);
  }
View Full Code Here

Examples of com.googlecode.sardine.model.Acl

    {
      return null;
    }
    for (Propstat propstat : list)
    {
      Acl a = propstat.getProp().getAcl();
      if (a != null && a.getAce() != null)
      {
        for (Ace ace : a.getAce())
        {
          result.add(new DavAce(ace));
        }
      }
    }
View Full Code Here

Examples of com.intridea.io.vfs.operations.Acl

   *
   * @return Current Access control list for a file
   * @throws FileSystemException
   */
  public Acl getAcl() throws FileSystemException {
    Acl myAcl = new Acl();
    AccessControlList s3Acl;
    try {
      s3Acl = getS3Acl();
    } catch (Exception e) {
      throw new FileSystemException(e);
    }

    // Get S3 file owner
    Owner owner = s3Acl.getOwner();
    fileOwner = owner;

    // Read S3 ACL list and build VFS ACL.
    Set<Grant> grants = s3Acl.getGrants();

    for (Grant item : grants) {
      // Map enums to jets3t ones
      Permission perm = item.getPermission();
      Acl.Permission[] rights;
      if (perm.equals(Permission.FullControl)) {
        rights = Acl.Permission.values();
      } else if (perm.equals(Permission.Read)) {
        rights = new Acl.Permission[1];
        rights[0] = Acl.Permission.READ;
      } else if (perm.equals(Permission.Write)) {
        rights = new Acl.Permission[1];
        rights[0] = Acl.Permission.WRITE;
      } else {
        // Skip unknown permission
        logger.error(String.format("Skip unknown permission %s", perm));
        continue;
      }

      // Set permissions for groups
      if (item.getGrantee() instanceof GroupGrantee) {
        GroupGrantee grantee = (GroupGrantee) item.getGrantee();
        if (GroupGrantee.AllUsers.equals(grantee)) {
          // Allow rights to GUEST
          myAcl.allow(Acl.Group.EVERYONE, rights);
        } else if (GroupGrantee.AuthenticatedUsers.equals(grantee)) {
          // Allow rights to AUTHORIZED
          myAcl.allow(Acl.Group.AUTHORIZED, rights);
        }
      } else if (item.getGrantee() instanceof CanonicalGrantee) {
        CanonicalGrantee grantee = (CanonicalGrantee) item.getGrantee();
        if (grantee.getIdentifier().equals(owner.getId())) {
          // The same owner and grantee understood as OWNER group
          myAcl.allow(Acl.Group.OWNER, rights);
        }
      }

    }

View Full Code Here

Examples of com.sun.jna.examples.win32.WinNT.ACL

    } while (repeat);

    SECURITY_DESCRIPTOR_RELATIVE sdr = new WinNT.SECURITY_DESCRIPTOR_RELATIVE(
        memory);
    memory.clear();
    ACL dacl = sdr.getDiscretionaryACL();
    ACCESS_ACEStructure[] aceStructures = dacl.getACEStructures();

    if (compact) {
      Map<String, ACCESS_ACEStructure> aceMap = new HashMap<String, ACCESS_ACEStructure>();
      for (ACCESS_ACEStructure aceStructure : aceStructures) {
        boolean inherted = ((aceStructure.AceFlags & WinNT.VALID_INHERIT_FLAGS) != 0);
View Full Code Here

Examples of com.sun.jna.platform.win32.WinNT.ACL

    } while (repeat);

    SECURITY_DESCRIPTOR_RELATIVE sdr = new WinNT.SECURITY_DESCRIPTOR_RELATIVE(
        memory);
    memory.clear();
    ACL dacl = sdr.getDiscretionaryACL();
    ACCESS_ACEStructure[] aceStructures = dacl.getACEStructures();

    if (compact) {
      Map<String, ACCESS_ACEStructure> aceMap = new HashMap<String, ACCESS_ACEStructure>();
      for (ACCESS_ACEStructure aceStructure : aceStructures) {
        boolean inherted = ((aceStructure.AceFlags & WinNT.VALID_INHERIT_FLAGS) != 0);
View Full Code Here

Examples of com.sun.mail.imap.ACL

        String name = null;
        while ((name = ir.readAtomString()) != null) {
      String rights = ir.readAtomString();
      if (rights == null)
          break;
      ACL acl = new ACL(name, new Rights(rights));
      v.addElement(acl);
        }
        r[i] = null;
    }
      }
View Full Code Here

Examples of de.iritgo.aktera.permissions.security.Acl

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

    Acl acl = aclByDomainObject.get(new Tuple2(objectType, objectId));
    if (acl != null && acl.checkPermission(principal, new SimplePermission(permission)))
    {
      return true;
    }

    return false;
View Full Code Here

Examples of gabriel.acl.Acl

    boolean negative = false;

    Principal principal = null;
    List permissions = new ArrayList();

    Acl acl = new Acl(owner, name);

    int PERMISSIONS = 1;
    int PRINCIPAL = 2;

    int state = PRINCIPAL;

    for (StringTokenizer stringTokenizer = new StringTokenizer(input, " \n{}", true);
         stringTokenizer.hasMoreTokens();) {

      String t = stringTokenizer.nextToken();

      if (" ".equals(t) || "\n".equals(t)) {
        // do nothing
      } else if ("{".equals(t)) {
        state = PERMISSIONS;
         } else if ("}".equals(t)) {
        state = PRINCIPAL;

        AclEntry entry = new AclEntry(principal);
        Iterator iterator = permissions.iterator();
        while (iterator.hasNext()) {
          Permission permission = (Permission) iterator.next();
          entry.addPermission(permission);
        }
        if (negative) {
          entry.setNegativePermissions();
          negative = false;
        }
        acl.addEntry(owner, entry);
        permissions = new ArrayList();
        principal = null;
      } else if (state == PRINCIPAL) {
        if (t.startsWith("-")) {
          negative = true;
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.