(authParams, bucketName, locationConstraint, request, authInfo)
| 166 | } |
| 167 | |
| 168 | function authBucketPut(authParams, bucketName, locationConstraint, request, authInfo) { |
| 169 | const ip = requestUtils.getClientIp(request, config); |
| 170 | const isSecure = requestUtils.getHttpProtocolSecurity(request, config); |
| 171 | const baseParams = { |
| 172 | authParams, |
| 173 | ip, |
| 174 | isSecure, |
| 175 | bucketName, |
| 176 | request, |
| 177 | authInfo, |
| 178 | locationConstraint, |
| 179 | }; |
| 180 | const requestConstantParams = [Object.assign( |
| 181 | baseParams, |
| 182 | { apiMethod: 'bucketPut' }, |
| 183 | )]; |
| 184 | |
| 185 | if (_isObjectLockEnabled(request.headers)) { |
| 186 | requestConstantParams.push(Object.assign( |
| 187 | {}, |
| 188 | baseParams, |
| 189 | { apiMethod: 'bucketPutObjectLock' }, |
| 190 | )); |
| 191 | requestConstantParams.push(Object.assign( |
| 192 | {}, |
| 193 | baseParams, |
| 194 | { apiMethod: 'bucketPutVersioning' }, |
| 195 | )); |
| 196 | } |
| 197 | |
| 198 | if (_isAclProvided(request.headers)) { |
| 199 | requestConstantParams.push(Object.assign( |
| 200 | {}, |
| 201 | baseParams, |
| 202 | { apiMethod: 'bucketPutACL' }, |
| 203 | )); |
| 204 | } |
| 205 | |
| 206 | return requestConstantParams; |
| 207 | } |
| 208 | |
| 209 | /** |
| 210 | * PUT Service - Create bucket for the user |
no test coverage detected