@@ -107,7 +107,7 @@ describe.skip('bucket authorization for bucketGet, bucketHead, ' +
107107 }
108108 bucket . setCannedAcl ( value . canned ) ;
109109 const results = requestTypes . map ( type =>
110- isBucketAuthorized ( bucket , type , value . id , value . auth , log ) ) ;
110+ isBucketAuthorized ( bucket , type , value . id , value . auth , false , log ) ) ;
111111 assert . deepStrictEqual ( results , value . response ) ;
112112 done ( ) ;
113113 } ) ;
@@ -129,13 +129,13 @@ describe('bucket authorization for bucketGetACL', () => {
129129
130130 it ( 'should allow access to bucket owner' , ( ) => {
131131 const result = isBucketAuthorized ( bucket , 'bucketGetACL' ,
132- ownerCanonicalId , authInfo ) ;
132+ ownerCanonicalId , authInfo , false ) ;
133133 assert . strictEqual ( result , true ) ;
134134 } ) ;
135135
136136 it ( 'should allow access to user in bucket owner account' , ( ) => {
137137 const result = isBucketAuthorized ( bucket , 'bucketGetACL' ,
138- ownerCanonicalId , userAuthInfo ) ;
138+ ownerCanonicalId , userAuthInfo , false ) ;
139139 assert . strictEqual ( result , true ) ;
140140 } ) ;
141141
@@ -158,15 +158,15 @@ describe('bucket authorization for bucketGetACL', () => {
158158 orders . forEach ( value => {
159159 it ( `should allow access to ${ value . it } ` , done => {
160160 const noAuthResult = isBucketAuthorized ( bucket , 'bucketGetACL' ,
161- value . id ) ;
161+ value . id , null , false ) ;
162162 assert . strictEqual ( noAuthResult , false ) ;
163163 if ( value . aclParam ) {
164164 bucket . setSpecificAcl ( value . aclParam [ 1 ] , value . aclParam [ 0 ] ) ;
165165 } else if ( value . canned ) {
166166 bucket . setCannedAcl ( value . canned ) ;
167167 }
168168 const authorizedResult = isBucketAuthorized ( bucket , 'bucketGetACL' ,
169- value . id , value . auth ) ;
169+ value . id , value . auth , false ) ;
170170 assert . strictEqual ( authorizedResult , true ) ;
171171 done ( ) ;
172172 } ) ;
@@ -188,13 +188,13 @@ describe('bucket authorization for bucketPutACL', () => {
188188
189189 it ( 'should allow access to bucket owner' , ( ) => {
190190 const result = isBucketAuthorized ( bucket , 'bucketPutACL' ,
191- ownerCanonicalId , authInfo ) ;
191+ ownerCanonicalId , authInfo , false ) ;
192192 assert . strictEqual ( result , true ) ;
193193 } ) ;
194194
195195 it ( 'should allow access to user in bucket owner account' , ( ) => {
196196 const result = isBucketAuthorized ( bucket , 'bucketPutACL' ,
197- ownerCanonicalId , userAuthInfo ) ;
197+ ownerCanonicalId , userAuthInfo , false ) ;
198198 assert . strictEqual ( result , true ) ;
199199 } ) ;
200200
@@ -203,11 +203,11 @@ describe('bucket authorization for bucketPutACL', () => {
203203 it ( 'should allow access to account if ' +
204204 `account was granted ${ value } right` , done => {
205205 const noAuthResult = isBucketAuthorized ( bucket , 'bucketPutACL' ,
206- accountToVet , altAcctAuthInfo ) ;
206+ accountToVet , altAcctAuthInfo , false ) ;
207207 assert . strictEqual ( noAuthResult , false ) ;
208208 bucket . setSpecificAcl ( accountToVet , value ) ;
209209 const authorizedResult = isBucketAuthorized ( bucket , 'bucketPutACL' ,
210- accountToVet , altAcctAuthInfo ) ;
210+ accountToVet , altAcctAuthInfo , false ) ;
211211 assert . strictEqual ( authorizedResult , true ) ;
212212 done ( ) ;
213213 } ) ;
@@ -229,13 +229,13 @@ describe('bucket authorization for bucketOwnerAction', () => {
229229
230230 it ( 'should allow access to bucket owner' , ( ) => {
231231 const result = isBucketAuthorized ( bucket , 'bucketDeleteCors' ,
232- ownerCanonicalId , authInfo ) ;
232+ ownerCanonicalId , authInfo , false ) ;
233233 assert . strictEqual ( result , true ) ;
234234 } ) ;
235235
236236 it ( 'should allow access to user in bucket owner account' , ( ) => {
237237 const result = isBucketAuthorized ( bucket , 'bucketDeleteCors' ,
238- ownerCanonicalId , userAuthInfo ) ;
238+ ownerCanonicalId , userAuthInfo , false ) ;
239239 assert . strictEqual ( result , true ) ;
240240 } ) ;
241241
@@ -257,7 +257,7 @@ describe('bucket authorization for bucketOwnerAction', () => {
257257 }
258258 bucket . setCannedAcl ( value . canned ) ;
259259 const result = isBucketAuthorized ( bucket , 'bucketDeleteCors' ,
260- value . id , value . auth ) ;
260+ value . id , value . auth , false ) ;
261261 assert . strictEqual ( result , false ) ;
262262 done ( ) ;
263263 } ) ;
@@ -279,13 +279,13 @@ describe('bucket authorization for bucketDelete', () => {
279279
280280 it ( 'should allow access to bucket owner' , ( ) => {
281281 const result = isBucketAuthorized ( bucket , 'bucketDelete' ,
282- ownerCanonicalId , authInfo ) ;
282+ ownerCanonicalId , authInfo , false ) ;
283283 assert . strictEqual ( result , true ) ;
284284 } ) ;
285285
286286 it ( 'should allow access to user in bucket owner account' , ( ) => {
287287 const result = isBucketAuthorized ( bucket , 'bucketDelete' ,
288- ownerCanonicalId , userAuthInfo ) ;
288+ ownerCanonicalId , userAuthInfo , false ) ;
289289 assert . strictEqual ( result , true ) ;
290290 } ) ;
291291
@@ -306,7 +306,7 @@ describe('bucket authorization for bucketDelete', () => {
306306 bucket . setSpecificAcl ( value . aclParam [ 1 ] , value . aclParam [ 0 ] ) ;
307307 }
308308 bucket . setCannedAcl ( value . canned ) ;
309- const result = isBucketAuthorized ( bucket , 'bucketDelete' , value . id , value . auth ) ;
309+ const result = isBucketAuthorized ( bucket , 'bucketDelete' , value . id , value . auth , false ) ;
310310 assert . strictEqual ( result , false ) ;
311311 done ( ) ;
312312 } ) ;
@@ -330,13 +330,13 @@ describe('bucket authorization for objectDelete and objectPut', () => {
330330
331331 it ( 'should allow access to bucket owner' , ( ) => {
332332 const results = requestTypes . map ( type =>
333- isBucketAuthorized ( bucket , type , ownerCanonicalId , authInfo ) ) ;
333+ isBucketAuthorized ( bucket , type , ownerCanonicalId , authInfo , false ) ) ;
334334 assert . deepStrictEqual ( results , [ true , true ] ) ;
335335 } ) ;
336336
337337 it ( 'should allow access to user in bucket owner account' , ( ) => {
338338 const results = requestTypes . map ( type =>
339- isBucketAuthorized ( bucket , type , ownerCanonicalId , userAuthInfo ) ) ;
339+ isBucketAuthorized ( bucket , type , ownerCanonicalId , userAuthInfo , false ) ) ;
340340 assert . deepStrictEqual ( results , [ true , true ] ) ;
341341 } ) ;
342342
@@ -361,13 +361,13 @@ describe('bucket authorization for objectDelete and objectPut', () => {
361361 it ( `should allow access to ${ value . it } ` , done => {
362362 bucket . setCannedAcl ( value . canned ) ;
363363 const noAuthResults = requestTypes . map ( type =>
364- isBucketAuthorized ( bucket , type , value . id , value . auth ) ) ;
364+ isBucketAuthorized ( bucket , type , value . id , value . auth , false ) ) ;
365365 assert . deepStrictEqual ( noAuthResults , value . response ) ;
366366 if ( value . aclParam ) {
367367 bucket . setSpecificAcl ( value . aclParam [ 1 ] , value . aclParam [ 0 ] ) ;
368368 }
369369 const authResults = requestTypes . map ( type =>
370- isBucketAuthorized ( bucket , type , accountToVet , altAcctAuthInfo ) ) ;
370+ isBucketAuthorized ( bucket , type , accountToVet , altAcctAuthInfo , false ) ) ;
371371 assert . deepStrictEqual ( authResults , [ true , true ] ) ;
372372 done ( ) ;
373373 } ) ;
@@ -379,10 +379,10 @@ describe('bucket authorization for objectPutACL and objectGetACL', () => {
379379 'are done at object level' , done => {
380380 const requestTypes = [ 'objectPutACL' , 'objectGetACL' ] ;
381381 const results = requestTypes . map ( type =>
382- isBucketAuthorized ( bucket , type , accountToVet , altAcctAuthInfo ) ) ;
382+ isBucketAuthorized ( bucket , type , accountToVet , altAcctAuthInfo , false ) ) ;
383383 assert . deepStrictEqual ( results , [ true , true ] ) ;
384384 const publicUserResults = requestTypes . map ( type =>
385- isBucketAuthorized ( bucket , type , constants . publicId ) ) ;
385+ isBucketAuthorized ( bucket , type , constants . publicId , null , false ) ) ;
386386 assert . deepStrictEqual ( publicUserResults , [ true , true ] ) ;
387387 done ( ) ;
388388 } ) ;
0 commit comments