Skip to content

Commit 5c9fec7

Browse files
committed
refactor(storage): apply code review suggestions
1 parent b662978 commit 5c9fec7

2 files changed

Lines changed: 2 additions & 3 deletions

File tree

storage/removeBucketIamMember.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ function main(
6666
if (role.members.length === 0) {
6767
policy.bindings.splice(index, 1);
6868
} else {
69-
policy.bindings.index = role;
69+
policy.bindings[index] = role;
7070
}
7171

7272
// Updates the bucket's IAM policy

storage/system-test/iam.test.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@ const roleName = 'roles/storage.objectViewer';
3131
// Condition
3232
const title = 'match-prefix';
3333
const description = 'Applies to objects matching a prefix';
34-
const expression =
35-
'resource.name.startsWith("projects/_/buckets/bucket-name/objects/prefix-a-")';
34+
const expression = `resource.name.startsWith("projects/_/buckets/${bucketName}/objects/prefix-a-")`;
3635

3736
before(async () => {
3837
await bucket.create();

0 commit comments

Comments
 (0)