Skip to content

Fix: BucketList folders only accessible via IDP perms reverting to dummy folders on folder add/delete#251

Merged
TimCsaky merged 1 commit into
masterfrom
bug/dummy-folders-with-idp-perms
Jun 25, 2026
Merged

Fix: BucketList folders only accessible via IDP perms reverting to dummy folders on folder add/delete#251
TimCsaky merged 1 commit into
masterfrom
bug/dummy-folders-with-idp-perms

Conversation

@norrisng-bc

Copy link
Copy Markdown
Member

Description

This PR fixes a bug on the "My Files" page, where folders only visible due to IDP permissions revert to dummy folders whenever a folder is added or removed.

These folders start out as dummy folders, but are substituted with fully-fledged folders (as if the user has only READ permissions on them) during BucketList.onMounted. This substitution logic wasn't replicated whenever a user added/removed a folder, so the bucket list refresh it triggers reverted those intermediate folders to dummy folders.

This PR extracts that substitution logic into a helper function, which is now also called whenever folders are added/removed by the user.

Also: in bucketStore.ts, permResponse has been renamed userPermResponse for clarity, and to reflect the difference between user permissions and IDP permissions.

https://apps.nrs.gov.bc.ca/int/jira/browse/SHOWCASE-4365

Types of changes

Bug fix (non-breaking change which fixes an issue)

Checklist

  • I have read the CONTRIBUTING doc
  • I have checked that unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

Further comments

N/A

This fixes a minor BucketList bug, where buckets only accessible via IDP perms would revert to dummy folders when folders are added/removed by the user.
This is because fetchBuckets() does not use the same logic to populate dummy folders with ones that may be accessible via IDP perms.

Also: in bucketStore, rename permResponse to userPermResponse for clarity (and to reflect difference between user perms and IDP perms).
@github-actions

Copy link
Copy Markdown

Coverage Report (Application)

Totals Coverage
Statements: 70.67% ( 53 / 75 )
Methods: 62.5% ( 5 / 8 )
Lines: 81.63% ( 40 / 49 )
Branches: 44.44% ( 8 / 18 )

@github-actions

Copy link
Copy Markdown

Coverage Report (Frontend)

Totals Coverage
Statements: 14.54% ( 862 / 5928 )
Methods: 14.84% ( 161 / 1085 )
Lines: 17.95% ( 571 / 3181 )
Branches: 7.82% ( 130 / 1662 )

@TimCsaky TimCsaky merged commit 4dbb381 into master Jun 25, 2026
17 of 18 checks passed
@norrisng-bc norrisng-bc deleted the bug/dummy-folders-with-idp-perms branch June 26, 2026 19:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants