Skip to content

Commit

Permalink
Merge pull request #265 from bcgov/bug/child-bucket-perms
Browse files Browse the repository at this point in the history
pass permCodes in createBucketChild controller
  • Loading branch information
TimCsaky authored Jun 21, 2024
2 parents 58a5dc7 + 0d2210d commit 63812c2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/src/controllers/bucket.js
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,9 @@ const controller = {
await controller._validateCredentials(childBucket);
childBucket.userId = await userService.getCurrentUserId(getCurrentIdentity(req.currentUser, SYSTEM_USER));

// assign all permissions
childBucket.permCodes = Object.values(Permissions);

// Create child bucket
const response = await bucketService.create(childBucket);
res.status(201).json(redactSecrets(response, secretFields));
Expand Down

0 comments on commit 63812c2

Please sign in to comment.