(locationConstraint, log, cb)
| 136 | } |
| 137 | |
| 138 | function _handleAuthResults(locationConstraint, log, cb) { |
| 139 | return (err, authorizationResults) => { |
| 140 | if (err) { |
| 141 | return cb(err); |
| 142 | } |
| 143 | if (!authorizationResults.every(res => { |
| 144 | if (Array.isArray(res)) { |
| 145 | return res.every(subRes => subRes.isAllowed); |
| 146 | } |
| 147 | return res.isAllowed; |
| 148 | })) { |
| 149 | log.trace( |
| 150 | 'authorization check failed for user', |
| 151 | { locationConstraint }, |
| 152 | ); |
| 153 | return cb(errors.AccessDenied); |
| 154 | } |
| 155 | return cb(null, locationConstraint); |
| 156 | }; |
| 157 | } |
| 158 | |
| 159 | function _isObjectLockEnabled(headers) { |
| 160 | const header = headers['x-amz-bucket-object-lock-enabled']; |
no test coverage detected