-
Notifications
You must be signed in to change notification settings - Fork 346
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
ACL to private by default #208
Comments
I really like asset sync, it's awesome! This adjustment would make it better though.
This is probably the line that should be switched, could introduce an option to modify it though. |
Has anyone gotten anywhere with this? I would monkey patch it for my own use, but the |
This still open? here the line asset_sync/lib/asset_sync/storage.rb Line 151 in e006e5c
|
By reading the source I think asset_sync/lib/asset_sync/storage.rb Line 171 in e006e5c
|
I added following code to config/initializer/asset_sync.rb
but So I checked |
The source code looks like this: asset_sync/lib/asset_sync/storage.rb Lines 168 to 178 in e006e5c
So I think it might work if you change Since asset_sync/lib/asset_sync/storage.rb Lines 148 to 153 in e006e5c
|
@PikachuEXE At first I thought so. But If https://github.com/fog/fog-aws/blob/master/lib/fog/aws/models/storage/file.rb#L152 |
OK I see what's the issue |
@PikachuEXE Since |
So if I change the default to |
Oh sorry people want those to be handled by bucket policy The code change should be like: elsif key = self.config.custom_headers.keys.detect {|k| f.match(Regexp.new(k))}
self.config.custom_headers[key].each do |k, value|
# Delete value on `nil`
if value.nil?
file.delete(k.to_sym)
else
file[k.to_sym] = value
end
end
log "Overwriting matching file #{f} with custom headers #{headers.to_s}"
end |
@PikachuEXE Because I think that the setting will be as follows,
but, In fact there is no http header called |
This just came to my mind, # configuration
# default value is true for compatibility.
config.config.fog_public = true | false, nil | :default
# in update_file method
...
case
when config.fog_public == :default
file.delete(:public)
when config.fog_public
file[:public] = true
else
file[:public] = false
end |
I think the default should still be |
@PikachuEXE umm...
how about this?
|
I think I will just add |
Good point
👍 |
I'd just try to respect the configs from provider instead of (re)setting them at the gem level. Is it possible to just get rid of the PD: the concept of Access Control List (ACL) have been around in computing for some decades https://en.wikipedia.org/wiki/Access_control_list |
@woqer |
Created #377, please let me know your opinion |
I am releasing a new version with #377 if no one objects~ |
@PikachuEXE Awesome! 🎉 |
@pocari not sure if this is still relevant, but this works for me |
Is it possible to set the ACL for assets uploaded to private by default and let our bucket policy handle the permissions?
The text was updated successfully, but these errors were encountered: