Skip to content

fix: accessible returns wrong permission when there are multiple#2099

Merged
spaenleh merged 3 commits intomainfrom
fix-accessible-permission
Mar 10, 2026
Merged

fix: accessible returns wrong permission when there are multiple#2099
spaenleh merged 3 commits intomainfrom
fix-accessible-permission

Conversation

@spaenleh
Copy link
Copy Markdown
Member

@spaenleh spaenleh commented Mar 10, 2026

In this PR I fix a bug where the accessible call would always return the first membership that was found without checking that it is the correct one for the user.

I added a test that ensure this fails before the fix and passes after.

This should fix issues for people that have shared item in their home, where they are not admin, but they are shown the option to perform administrative tasks.

fix #2100

@spaenleh spaenleh self-assigned this Mar 10, 2026
@spaenleh spaenleh changed the title fix: add test that fails fix: accessible returns wrong permission when there are multiple Mar 10, 2026
@spaenleh spaenleh added the bug 🪲 Something isn't working label Mar 10, 2026
@spaenleh spaenleh force-pushed the fix-accessible-permission branch from 008adff to 5e7eebf Compare March 10, 2026 08:21
@sonarqubecloud
Copy link
Copy Markdown

@spaenleh spaenleh merged commit 324894e into main Mar 10, 2026
8 checks passed
@spaenleh spaenleh deleted the fix-accessible-permission branch March 10, 2026 08:26
spaenleh added a commit that referenced this pull request Mar 10, 2026
* fix: add test that fails

* fix: add code that fixes the issue

* fix: itemPublished tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug 🪲 Something isn't working v2.13.6

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Accessible return wrong permission for shared items where the user is not an admin

1 participant