-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BC-6352 - Deleting the creator field causes the files not to be displayed anymore #4716
Conversation
…e teams' files to show all the teams' files
…gned URLs for the legacy storage instead of a school-owned bucket
@@ -104,11 +58,7 @@ const checkPermissions = (permission) => async (user, file) => { | |||
return Promise.reject(); | |||
} | |||
|
|||
return checkTeamPermission({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That you removed this check altogether, does it mean, it was completely unnecessary?
This old code is really hard to read, so I'm confused, sorry...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's ok 😊 . Yes there was a pretty weird (in my opinion) permission check which required the author of a file to be marked as a file's creator or present in the first position of the permissions array. And none of them is true anymore for some cases (for some files) since we've had a requirement to completely get rid of all the user's data, including any references etc. (so we're removing any existing creator references and any personal user's reference occurrences within all the file's permissions arrays). That's why we've had to also delete the requirement from the discussed function - keeping it caused some files to not being accessible anymore (by anyone basically).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All this code is pretty pretty weird, indeed! I tried to understand it again more thoroughly but I can't get my head around it. What irritates me in your change is just, that there was a function before that checked for a team permission (at least by its name) and that this check is now completely gone. If the name is correct, this would mean that now a user from another team could see a file, that he is not allowed to, wouldn't it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dyedwiper Hm when I was developing this change and testing it afterwards it felt like the whole function is not doing anything without this "creator check". But let me verify it step-by-step again and get back to you.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dyedwiper You were right. I was able to get rid only of this weird "author check", but keep the whole "team* role" check. Please re-review.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems better, but I still don't understand what this change means. I guess somebody might not be able to see a file like he used to. But I'll approve now from a code perspective. You have to test this or wait for complaints ;)
Quality Gate passedIssues Measures |
…e teams' files to show all the teams' files
Description
Links to Tickets or other pull requests
https://ticketsystem.dbildungscloud.de/browse/BC-6352
Changes
Datasecurity
Deployment
New Repos, NPM pakages or vendor scripts
Approval for review
generate-client:server
was executed in vue frontend and changes were tested and put in a PR with the same branch name.