-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Group support #2667
Group support #2667
Conversation
@MFijak Thanks for the contribution. I have quickly scanned the PR and added some remarks. There may be more items i need to check. But this is a nice start for someone's first Rust code. I'm not sure when i have some time to check the rest of the code, and how it works etc.. But if you have any questions please leave a comment here, or come and join on our Matrix channel. |
I am glad to hear that! No worries take your time. Just a small question. You wrote that you added some remarks. Are these visible to me? I clicked through the tabs but somehow I can not see any remarks. I probably misunderstood, because you wrote them down locally on your computer? |
No, i wrote them on Github. But i everytime forget that i need to |
Looks neat, the thing you can do however is a rebase I assume |
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.
So far it looks pretty good to me! I've noticed a couple of small things, but for a rust newbie this is solid work.
I haven't had time to fully review the query logic, but in a few small tests it has worked correctly so far.
migrations/postgresql/2022-07-27-110000_add_group_support/up.sql
Outdated
Show resolved
Hide resolved
Oh wow, it seems I missed this really promising PR, thanks a lot for your work and time @MFijak (and everybody involved since of course!), once production-ready & merged it will make a lot of people happy ! Sticking around and ready to test this on our small family-wide setup :) Thanks & cheers! |
Co-authored-by: Daniel García <dani-garcia@users.noreply.github.com>
Co-authored-by: Daniel García <dani-garcia@users.noreply.github.com>
@MFijak i did some further checking, and indeed the And using the check where the |
Also, in general, I would like this whole PR to be squashed into one commit instead of the 23 commits currently, that would also make the merge/commit nicer to check in the future 😄. But that is maybe something for right before we are going to merge it. |
This is ready for merging for me, if you can rebase it against the latest main and squash it into 1-5 commits, that would be perfect, otherwise I'll see if I can do it myself. We've had a release last week which means if we merge this soon it's gonna have some time for user testing before the next release. Nice job 👍 |
Closed as superseded by #2846 |
Hello all,
This is my first ever pull request and I also never used Rust before. Please tell me if I did anything wrong.
I implemented the group support, which is related to issue #1623.
To test my changes following sites can be used:
There was one code segment I was not so sure about if my implementation is the correct approach:
pub async fn find_by_user_uuid(user_uuid: &str, conn: &DbConn)
Db/models/collection.rs
This function basically returns all collections which the user has access to. I squeezed my group implementation into the query builder. Maybe a better approach would be to fire two independent queries. Each for user collections and group collections. I think this would be the better approach, because you can much clearer see what the query does. But I would assume there comes a small performance penalty.