From 63a080885c5fb0255d71a023c730ccd3a7e1d44e Mon Sep 17 00:00:00 2001 From: Awais Qureshi Date: Thu, 24 Aug 2023 15:29:23 +0500 Subject: [PATCH] feat!: setting AWS_DEFAULT_ACL default value in lms.py. (#32816) * feat!: setting AWS_DEFAULT_ACL default value in lms.py. https://django-storages.readthedocs.io/en/1.10.1/backends/amazon-S3.html --- lms/envs/production.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lms/envs/production.py b/lms/envs/production.py index 2a4df6657b..d5404c9cff 100644 --- a/lms/envs/production.py +++ b/lms/envs/production.py @@ -453,6 +453,11 @@ AWS_SECRET_ACCESS_KEY = AUTH_TOKENS.get("AWS_SECRET_ACCESS_KEY", AWS_SECRET_ACCE if AWS_SECRET_ACCESS_KEY == "": AWS_SECRET_ACCESS_KEY = None +# these variable already exists in cms with `private` value. django-storages starting `1.10.1` +# does not set acl values till 1.9.1 default-acl is `public-read`. To maintain the behaviour +# same with upcoming version setting it to `public-read`. +AWS_DEFAULT_ACL = 'public-read' +AWS_BUCKET_ACL = AWS_DEFAULT_ACL AWS_STORAGE_BUCKET_NAME = AUTH_TOKENS.get('AWS_STORAGE_BUCKET_NAME', 'edxuploads') # Disabling querystring auth instructs Boto to exclude the querystring parameters (e.g. signature, access key) it