Skip to content

feat(s3): add BucketGrants#36102

Merged
mergify[bot] merged 2 commits intomainfrom
otaviom/bucket-grants
Nov 20, 2025
Merged

feat(s3): add BucketGrants#36102
mergify[bot] merged 2 commits intomainfrom
otaviom/bucket-grants

Conversation

@otaviomacedo
Copy link
Copy Markdown
Contributor

Create a new class, BucketGrants, that has all the grants methods, and delegate the grant*() methods in BucketBase to it.

Note: grantPublicAccess() first validates that it is allowed to proceed by checking the disallowPublicAccess protected property. To move this logic over to a new class, it was necessary to make disallowPublicAccess public. Since it was only set during instantiation and was protected, it was effectively immutable from the outside. But we can't make it immutable because this would be considered a backwards incompatible change. On the other hand, there is not harm. Users can disallow public access at any moment now, instead of just at creation of the object. For CfnBucket, granting public access will always be allowed.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@github-actions github-actions bot added the p2 label Nov 19, 2025
@aws-cdk-automation aws-cdk-automation requested a review from a team November 19, 2025 10:09
@otaviomacedo otaviomacedo added pr-linter/exempt-readme The PR linter will not require README changes pr-linter/exempt-integ-test The PR linter will not require integ test changes and removed p2 labels Nov 19, 2025
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Nov 19, 2025
Copy link
Copy Markdown
Collaborator

@aws-cdk-automation aws-cdk-automation left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(This review is outdated)

@otaviomacedo otaviomacedo added the pr-linter/exempt-test The PR linter will not require test changes label Nov 19, 2025
@aws-cdk-automation aws-cdk-automation dismissed their stale review November 19, 2025 11:34

✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.

@aws-cdk-automation aws-cdk-automation added the pr/needs-maintainer-review This PR needs a review from a Core Team Member label Nov 19, 2025
@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Nov 20, 2025

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Nov 20, 2025

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mergify mergify bot merged commit 5891172 into main Nov 20, 2025
18 of 19 checks passed
@mergify mergify bot deleted the otaviom/bucket-grants branch November 20, 2025 10:25
@github-actions
Copy link
Copy Markdown
Contributor

Comments on closed issues and PRs are hard for our team to see.
If you need help, please open a new issue that references this one.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 20, 2025
@aws-cdk-automation aws-cdk-automation removed the pr/needs-maintainer-review This PR needs a review from a Core Team Member label Nov 20, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

contribution/core This is a PR that came from AWS. pr-linter/exempt-integ-test The PR linter will not require integ test changes pr-linter/exempt-readme The PR linter will not require README changes pr-linter/exempt-test The PR linter will not require test changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants