public Task UploadMultiplePermissions() { ObjectAclBuilder acl = new ObjectAclBuilder(); acl.AddEmail(TestConstants.TestEmail, ObjectPermissions.Read | ObjectPermissions.ReadAcl | ObjectPermissions.WriteAcl | ObjectPermissions.FullControl); acl.AddUserId(TestConstants.TestUserId, ObjectPermissions.Read | ObjectPermissions.ReadAcl | ObjectPermissions.WriteAcl | ObjectPermissions.FullControl); return(UploadTransferAsync(nameof(UploadMultiplePermissions), upload => upload.WithAccessControl(acl))); }
public IUpload WithAccessControl(ObjectAclBuilder acl) { Validator.RequireNotNull(acl, nameof(acl)); _request.AclGrantRead = acl.ReadObject; _request.AclGrantReadAcp = acl.ReadAcl; _request.AclGrantWriteAcp = acl.WriteAcl; _request.AclGrantFullControl = acl.FullControl; return(this); }