Skip to content

Commit

Permalink
Fix storage permissions. (#486)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmdobry authored Sep 20, 2017
1 parent 706532b commit 7cd93ef
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion appengine/storage/system-test/app.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ test.before(async () => {
await bucket.create(bucket).then((data) => {
return bucket.acl.add({
entity: 'allUsers',
role: Storage.acl.WRITER_ROLE
role: Storage.acl.READER_ROLE
});
});
});
Expand Down
3 changes: 2 additions & 1 deletion scripts/clean
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,15 @@ if (!args.length || args[0] === 'coverage') {
rm('-rf', 'coverage');
} else if (args[0] === 'buckets') {
const NAME_REG_EXP = /^nodejs-docs-samples-test-[a-z0-9]{8}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{12}$/;
const NAME_REG_EXP_2 = /^docs-samples-gae-test-[a-z0-9]{8}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{12}$/;

storage
.getBuckets()
.then(([buckets]) => {
let promise = Promise.resolve();

buckets
.filter((bucket) => NAME_REG_EXP.test(bucket.name))
.filter((bucket) => NAME_REG_EXP.test(bucket.name) || NAME_REG_EXP_2.test(bucket.name))
.forEach((bucket) => {
promise = promise.then(() => {
return bucket.deleteFiles()
Expand Down

0 comments on commit 7cd93ef

Please sign in to comment.