Skip to content
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

[BUG] - Changing the group of a user, removes all recipes from their account. #3839

Closed
6 tasks done
shomilsaini opened this issue Jul 3, 2024 · 3 comments · Fixed by #3970
Closed
6 tasks done

[BUG] - Changing the group of a user, removes all recipes from their account. #3839

shomilsaini opened this issue Jul 3, 2024 · 3 comments · Fixed by #3970
Labels
bug: confirmed bug Something isn't working

Comments

@shomilsaini
Copy link

shomilsaini commented Jul 3, 2024

First Check

  • This is not a feature request.
  • I added a very descriptive title to this issue (title field is above this).
  • I used the GitHub search to find a similar issue and didn't find it.
  • I searched the Mealie documentation, with the integrated search.
  • I already read the docs and didn't find an answer.
  • This issue can be replicated on the demo site (https://demo.mealie.io/).

What is the issue you are experiencing?

Changing the group of a user, removes all recipes from their account.
If the group is changed back the recipes reappear.

Steps to Reproduce

Create a user
add the user to a group
create a recipe
change user's group to something else
Recipes gone.
Change the group to original
Recipes reappear.

Please provide relevant logs

There is no error in logs.

Mealie Version

ghcr.io/mealie-recipes/mealie:latest

Version
v1.10.1

Build d639d168fa7c39ffb802d46ba05e4ec4de33faf9

Deployment

Unraid

Additional Deployment Details

No response

@shomilsaini shomilsaini added bug Something isn't working triage labels Jul 3, 2024
@shomilsaini
Copy link
Author

Reproduced on the demo site.
Created user john/ password {johndoe1}
created recipe oatmeal
changed group to test(3)
Recipe is not shown because the system does not see john as owner of recipe. Recipe is visible on the admin login (default demo login) because it is shared/public etc.
change group back and everything is hunky-dory!

@michael-genson
Copy link
Collaborator

I agree that if a user changes groups, something has to happen to their recipes, but I'm not sure we want to move them to the new group, or if we want to just reassign them (similar to #3171).

Basically, when you switch the group of the user, their recipes still belong to the old group, which is why the user can't see them anymore. The users of the old group can still see the recipes, their owner just moved. We should either:

  1. Keep the recipes in the old group, but re-assign them to someone else
  2. Re-assign the recipes to the new group, and thus the old group can't see the recipes anymore

Or a third option: disable switching the group of a user so this scenario can't even happen.

@shomilsaini
Copy link
Author

shomilsaini commented Jul 3, 2024

They are user's recipes, they should move with user. Recipes should be tied to user not groups. Whatever user the group is in will have access. Also, the sharing system between users is overly convoluted.

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug: confirmed bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants