/** * Adds a grantee to the access control list (ACL) with the given permission. * If this access control list already * contains the grantee (i.e. the same grantee object) the permission for the * grantee will be updated. * * @param grantee * The grantee to whom the permission will apply. * @param permission * The permission to apply to the grantee. */ public void grantPermission(Grantee grantee, Permission permission) { getGrantsAsList().add(new Grant(grantee, permission)); }
static AccessControlList grantFullControlToBucketOwner(ServerSideEncryptingAmazonS3 s3Client, String bucket) { final AccessControlList acl = s3Client.getBucketAcl(bucket); acl.grantAllPermissions(new Grant(new CanonicalGrantee(acl.getOwner().getId()), Permission.FullControl)); return acl; }
/** * Adds a grantee to the access control list (ACL) with the given permission. * If this access control list already * contains the grantee (i.e. the same grantee object) the permission for the * grantee will be updated. * * @param grantee The grantee to whom the permission will apply. * @param permission The permission to apply to the grantee. */ public void grantPermission(Grantee grantee, Permission permission) { getGrantsAsList().add(new Grant(grantee, permission)); }
/** * Adds a grantee to the access control list (ACL) with the given permission. * If this access control list already * contains the grantee (i.e. the same grantee object) the permission for the * grantee will be updated. * * @param grantee The grantee to whom the permission will apply. * @param permission The permission to apply to the grantee. */ public void grantPermission(Grantee grantee, Permission permission) { getGrantsAsList().add(new Grant(grantee, permission)); }
/** * Adds a grantee to the access control list (ACL) with the given permission. * If this access control list already * contains the grantee (i.e. the same grantee object) the permission for the * grantee will be updated. * * @param grantee * The grantee to whom the permission will apply. * @param permission * The permission to apply to the grantee. */ public void grantPermission(Grantee grantee, Permission permission) { getGrantsAsList().add(new Grant(grantee, permission)); }
static AccessControlList grantFullControlToBucketOwner(ServerSideEncryptingAmazonS3 s3Client, String bucket) { final AccessControlList acl = s3Client.getBucketAcl(bucket); acl.grantAllPermissions(new Grant(new CanonicalGrantee(acl.getOwner().getId()), Permission.FullControl)); return acl; }