Skip to content

Conversation

@omkar-ethz
Copy link
Member

@omkar-ethz omkar-ethz commented Dec 11, 2025

Bug: When editing a paragraph with a file, the newly created file snippet contained an empty readACL, as it neither had a parent snippet, nor accessGroups were passed by the UI. updateACL was correctly set to createdBy (based on user's token). As a result, getById repository calls for the new file snippet with {user} context would fail, as the user wasn't in the readACL.

Fix this by also adding createdBy to readACL.

@omkar-ethz omkar-ethz marked this pull request as ready for review December 11, 2025 15:01
@omkar-ethz omkar-ethz requested a review from a team December 11, 2025 15:02
@minottic
Copy link
Member

minottic commented Dec 12, 2025

I am ultimately fine with this, but shouldn't the fix pass the ACLs to the file from the UI, rather than adding the email here?

@omkar-ethz
Copy link
Member Author

I am ultimately fine with this, but shouldn't the fix pass the ACLs to the file from the UI, rather than adding the email here?

the rationale for making the backend change was that creator should have read access - so this fix seemed reasonable regardless of the bug.

i'm not sure about trusting ACL/accessGroup info passed via the UI - right now, an unprivileged user can pass any accessGroups and the backend accepts it.. so the overall feature seems a little broken as it is.

But you are right, as a logbook can have multiple accessGroups, all those should be included for the edited file too. i will fix this on the UI as well in the next commit on monday. thanks!

@minottic
Copy link
Member

thanks. I agree ACLs are a bit brokne...

Copy link
Member

@minottic minottic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor comment

'ownerGroup',
'updateACL',
'readACL',
'shareACL',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how did this not fail before?

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.

3 participants