karlomikus / bar-assistant

Bar assistant is a all-in-one solution for managing your home bar
https://barassistant.app
MIT License
526 stars 22 forks source link

Add shelf sharing #332

Closed MPK1 closed 1 week ago

MPK1 commented 1 week ago

Checklist

Is your feature request related to a problem? Please describe. If I live together with other people and we share a shelf of ingredients, all people have to use the same account to be able to add or remove things from the shelf. This is kind of impractical.

Describe the solution you'd like I think the best solution would be to have two new fields in the profile: The first one contains a list of emails of users who are allowed to access your shelf. The second one contains an email address of another user who's shelf you want to use instead of an own one. This setting can only be set successfully if the other user has added you to the first field. The backend now hast to make two additional checks before returning a user's shelf data: First: Does this user want to use someone else's shelf? If no, continue as it was before, if yes, do second check. Second: Is this user in the "shelf-access-list" of the other user. If yes, return shelf of the other user, if no, return own shelf. This check should then be done before any GET/PUT/POST operation on a user's shelf.

karlomikus commented 1 week ago

Hello,

Currently you can enable "Make cocktails in my shelf public to all bar members" in the settings to achieve this, then other users will be able to filter by specific shelves.

Thanks!

MPK1 commented 1 week ago

Dear Karlo,

this is a nice feature, but does not solve the problem I'm trying to describe.

An example: I live in a shared apartment with three other people. We share a single "real-life" shelf. Every now and then, someone buys a bottle of liquor or empties some ingredient. With the feature you mentioned, only one person is able to add or remove ingredients from the shelf. If my roommate drinks all tonic water, he has to message me to remove it from the shelf. If the other roommate buys a bottle of dark rum, he has to message me to add it to the shelf. Of course every one could maintain his/her own shelf, but then, when someone drinks all tonic water, he/she has to notify all others to remove it from their shelves. As soon as multiple people physically add or remove things from the shelf, the existing feature is not sufficient anymore.

As proposed before, a relatively easy solution would be to "proxy" all shelf-related requests to someone else's shelf if both users somehow agree on this. Then, one user is the "master" whose shelf can be used by other users after both parties agree on that. This can be achieved, as proposed, with two additional fields per user.

Best regards,

Marcel

EDIT: Shopping lists would have to be treated the same way to avoid stupid situations...

zhdenny commented 1 week ago

In your situation.... Why not just maintain a single bar with a single username/password? And give everyone access to that single user/password

That would seem the best solution. Yes, this is still a compromise because now you share favorites and ratings and such.... But overall, this solution seems much easier to manage in the end for you

MPK1 commented 1 week ago

Why not just maintain a single bar with a single username/password? And give everyone access to that single user/password

That's probably the best work-around and also how I'm doing it right now. However: This is obviously not perfect, as you also mentioned that favorites and rankings are now shared. It comes with several other disadvantages when you think of permissions, or multiple bars, but this should be super rare scenarios.

karlomikus commented 1 week ago

This would make more sense as in each bar having it's on shelf, then specific roles could update the bar's shelf.

I'll think about it, but I don't see this releasing anytime soon.