Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't hardcode object permissions in static bucket #350

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
- Breaking change: the `deploy.dirty` API method is now fully deprecated, please use `deploy.direct` instead
- Internal change: moved most internal CloudFormation mutations into Package (where they rightly belong), via the `deployStage` param
- Upgraded CloudFront HTTPS TLS protocol to `TLSv1.2_2021`
- Migrate static bucket permissions from per-object ACLs to a bucket policy so users can customize the static bucket permissions using macros
- See: https://github.com/architect/package/pull/148, https://github.com/architect/deploy/pull/350
- Stop publishing to the GitHub Package registry

---
Expand Down
1 change: 0 additions & 1 deletion src/static/publish/s3/put-files/put-params.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ let getContentType = require('./get-content-type')
module.exports = function putParams (params) {
let { Bucket, Key, Body, file, fingerprint } = params
let s3Params = {
ACL: 'public-read',
Bucket,
Key,
Body,
Expand Down
3 changes: 1 addition & 2 deletions test/unit/static/publish/s3/put-files/put-params-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ test('Module is present', t => {
})

test('S3 put params', t => {
t.plan(9)
t.plan(8)

let html = 'public/index.html'
let json = 'public/something.json'
Expand All @@ -27,7 +27,6 @@ test('S3 put params', t => {

// Basic params
let result = sut(params)
t.equal(result.ACL, 'public-read', 'File is set to public-read ACL')
t.equal(result.Bucket, Bucket, 'Bucket is unchanged')
t.equal(result.Key, 'index.html', 'Key is unchanged')
t.equal(result.ContentType, 'text/html', 'Content type properly set')
Expand Down