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

Set AWS_DEFAULT_ACL based on S3_DEFAULT_ACL config #82

Closed
wants to merge 1 commit into from

Conversation

odemakov-epfl
Copy link

Add ability to set AWS_DEFAULT_ACL. Useful when you don't want to set bucket as public but still want handle profile images. By default the value remains the same -None.

Copy link
Contributor

@fghaas fghaas left a comment

Choose a reason for hiding this comment

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

Sorry this took a while to get to. I understand the purpose of this PR, but disagree with the implementation. :)

Please see #83 for an alternate implementation proposal.

@@ -15,7 +15,7 @@ AWS_S3_ENDPOINT_URL = "{{ "https" if S3_USE_SSL else "http" }}://{{ S3_HOST }}{%

AWS_S3_USE_SSL = {{ "True" if S3_USE_SSL else "False" }}
AWS_S3_SECURE_URLS = {{ "True" if S3_USE_SSL else "False" }}
AWS_DEFAULT_ACL = None # inherit from the bucket
AWS_DEFAULT_ACL = {{ '"{}"'.format(S3_DEFAULT_ACL) if S3_DEFAULT_ACL is defined else 'None' }} # None - inherit from the bucket
Copy link
Contributor

Choose a reason for hiding this comment

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

We tend to not use if x is defined constructs in our plugins. Instead, we define a default in plugin.py (even if that default is None).

Copy link
Author

Choose a reason for hiding this comment

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

Cool. Looking forward merging #83

@fghaas
Copy link
Contributor

fghaas commented Oct 2, 2024

Closing as superseded by #83. Thanks for the suggestion!

@fghaas fghaas closed this Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants