nl_tokens: 设置 object 的 权限列表
pl_tokens: function putObjectAcl ( params , callback ) { var <mask> = params . Headers ; var xml = '' ; if ( params [ 'AccessControlPolicy' ] ) { var AccessControlPolicy = util . clone ( params [ 'AccessControlPolicy' ] || { } ) ; var Grants = AccessControlPolicy . Grants || AccessControlPolicy . Grant ; Grants = util . isArray ( Grants ) ? Grants : [ Grants ] ; delete AccessControlPolicy . Grant ; delete AccessControlPolicy . Grants ; AccessControlPolicy . AccessControlList = { Grant : Grants } ; xml = util . json2xml ( { AccessControlPolicy : AccessControlPolicy } ) ; headers [ 'Content-Type' ] = 'application/xml' ; headers [ 'Content-MD5' ] = util . binaryBase64 ( util . md5 ( xml ) ) ; } // Grant Header 去重 util . each ( headers , function ( val , key ) { if ( key . indexOf ( 'x-cos-grant-' ) === 0 ) { headers [ key ] = uniqGrant ( headers [ key ] ) ; } } ) ; submitRequest . call ( this , { Action : 'name/cos:PutObjectACL' , method : 'PUT' , Bucket : params . Bucket , Region : params . Region , Key : params . Key , action : 'acl' , headers : headers , body : xml , } , function ( err , data ) { if ( err ) { return callback ( err ) ; } callback ( null , { statusCode : data . statusCode , headers : data . headers , } ) ; } ) ; }