Examples of listGrants()


Examples of com.cloud.bridge.persist.dao.SAclDao.listGrants()

     
      S3PolicyContext context = new S3PolicyContext( PolicyActions.GetBucketAcl, bucketName );
      verifyAccess( context, "SBucket", sbucket.getId(), SAcl.PERMISSION_READ_ACL );

      SAclDao aclDao = new SAclDao();
      List<SAcl> grants = aclDao.listGrants("SBucket", sbucket.getId());
      policy.setGrants(S3Grant.toGrants(grants));   
      return policy;
    }
   
    /**
 
View Full Code Here

Examples of com.cloud.bridge.persist.dao.SAclDao.listGrants()

      owner.setDisplayName("");
      policy.setOwner(owner);
    policy.setResultCode(200);
    
      SAclDao aclDao = new SAclDao();
      List<SAcl> grants = aclDao.listGrants( "SObjectItem", item.getId());
      policy.setGrants(S3Grant.toGrants(grants));   
      return policy;
    }
   
    /**
 
View Full Code Here

Examples of com.cloud.bridge.persist.dao.SAclDao.listGrants()

    }
  }

  private void deleteObjectAcls( String target, long itemId ) {
      SAclDao aclDao = new SAclDao();
      List<SAcl> itemAclData = aclDao.listGrants( target, itemId );
      if (null != itemAclData)
      {
          ListIterator it = itemAclData.listIterator();
        while( it.hasNext()) {
           SAcl oneTag = (SAcl)it.next();
View Full Code Here

Examples of com.cloud.bridge.persist.dao.SAclDao.listGrants()

    }
  }

  private void deleteBucketAcls( long bucketId ) {
      SAclDao aclDao = new SAclDao();
      List<SAcl> bucketAclData = aclDao.listGrants( "SBucket", bucketId );
      if (null != bucketAclData)
      {
          ListIterator it = bucketAclData.listIterator();
        while( it.hasNext()) {
           SAcl oneTag = (SAcl)it.next();
View Full Code Here

Examples of com.cloud.bridge.persist.dao.SAclDao.listGrants()

    // -> if an annoymous request, then canonicalUserId is an empty string
    String userId = UserContext.current().getCanonicalUserId();
        if ( 0 == userId.length())
        {
             // -> is an anonymous principal ACL set for this <target, targetId>?
         if (hasPermission( aclDao.listGrants( target, targetId, "A" ), requestedPermission )) return;
        }
        else
        {    // -> no priviledges means no access allowed   
         if (hasPermission( aclDao.listGrants( target, targetId, userId ), requestedPermission )) return;
View Full Code Here

Examples of com.cloud.bridge.persist.dao.SAclDao.listGrants()

             // -> is an anonymous principal ACL set for this <target, targetId>?
         if (hasPermission( aclDao.listGrants( target, targetId, "A" ), requestedPermission )) return;
        }
        else
        {    // -> no priviledges means no access allowed   
         if (hasPermission( aclDao.listGrants( target, targetId, userId ), requestedPermission )) return;

         // -> or maybe there is any principal authenticated ACL set for this <target, targetId>?
         if (hasPermission( aclDao.listGrants( target, targetId, "*" ), requestedPermission )) return;
        }
        throw new PermissionDeniedException( "Access Denied - ACLs do not give user the required permission" );
View Full Code Here

Examples of com.cloud.bridge.persist.dao.SAclDao.listGrants()

        else
        {    // -> no priviledges means no access allowed   
         if (hasPermission( aclDao.listGrants( target, targetId, userId ), requestedPermission )) return;

         // -> or maybe there is any principal authenticated ACL set for this <target, targetId>?
         if (hasPermission( aclDao.listGrants( target, targetId, "*" ), requestedPermission )) return;
        }
        throw new PermissionDeniedException( "Access Denied - ACLs do not give user the required permission" );
  }
 
  /**
 
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.