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

shared items among users - new functionality proposal/request #2602

Open
ghost-from-the-past opened this issue Apr 15, 2021 · 2 comments
Open
Labels
Enhancement ⚡️ New features, big or small. multi-user

Comments

@ghost-from-the-past
Copy link

Dear developers
as far I understand all the content of the database is encapsulated by user_id, different user don't have access to context, projects, tags, etc... of other users.
Is there currently a way to share this database items among users ?

If not, could be possible to use user_id=0 or NULL as a "share" flag ?
so when the object belongs to user_id=0 or NULL is accessible to any user.
(this option does not require to touch the database tables structure, but requires to touch the code to search for user_id and user_id=0)

or add another field in the tables to indicate that any user can access the object
(this option requires to touch the database tables structure to add and extra field in a lot of tables + touch the code to search for user_id and the flag)

another option is to not touch the tables but add a new table as level of indirection.
In this approach the actual fields user_id are not any more the direct real user but is now a group_id.
The new table contains the indirection pairs user_id <--> group_id.
The actual case is a simple relation 1 to 1, group_id and user_id are the same.
Everything continues as before, no code change, except the extra table to translate user_id to group_id.
Fully backwards compatible.
This will require a new dialogs to handle the group creations and the assignation of user_id to a group_id.
And there are no more complexity as you restraint each user_id to belong to only one group_id (a group_id can have several users but a user can NOT be in several groups).

Going for a user_id belonging to several groups will require code modifications in the search with multiple key.

I hope you get the idea
Regards
Daniel

@ZeiP ZeiP added Enhancement ⚡️ New features, big or small. multi-user labels Apr 15, 2021
@ZeiP
Copy link
Member

ZeiP commented Apr 15, 2021

Similar (but not same) functionality has already been suggested in some other issues in the ”multi-user” label: multi-user

It's unlikely I would have time to work towards implementing this, because there are other issues which are IMO more pressing. However, if someone were to work on this, I'd gladly contribute to the planning of the feature and if it fits the bill, also merge it to our codebase. Let me know if you're interested in working towards implementing this kind of functionality.

@ghost-from-the-past
Copy link
Author

ah ha ha! now I understand what the label multi-user refers to ...

You are right, your priorities first. Unfortunately my skills on Ruby are non existent. I'll try to read and learn, will see where that takes me.

After reading the titles of several of the request with the label "multi-user" I guess that the my proposal to add a table as indirection for group_id and user_id will fulfill the majority of the cases (if not all) and doesn't seems complicated.

Regards
Daniel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement ⚡️ New features, big or small. multi-user
Projects
None yet
Development

No branches or pull requests

2 participants