feat: 🎸 add support for dynamic credentials in storage bucket (#1897)
* feat: 🎸 add support for dynamic credentials in storage bucket
This commit is contained in:
1 parent
3cb8417a89
commit
4910070c95
13 files changed
+420
-96
No files matched your search
@@ -8,6 +8,11 @@ import ApplicationSerializer from './application';
|
||||
export default class StorageBucketSerializer extends ApplicationSerializer {
|
||||
serialize(snapshot) {
|
||||
const serialized = super.serialize(...arguments);
|
||||
//Dynamic credentials do not allow credential rotation, and the API requires this field to be
|
||||
//sent along with the dynamic credential fields
|
||||
if (serialized.attributes.role_arn) {
|
||||
serialized.attributes.disable_credential_rotation = true;
|
||||
}
|
||||
if (!snapshot.record.isNew) {
|
||||
delete serialized.bucket_name;
|
||||
delete serialized.bucket_prefix;
|
||||
|
||||
Reference in new issue
Block a user