Hey guys,
I would like to create a to do list that is accessible for certain groups. So for example, I want my “to do list” service to be used by company A and company B. I only want the employees of company A to see the to do’s they’ve added to the list, and only want the employees of company B to see their to do’s. I was thinking about creating a role for every company, so a role called Company A that is linked to all the employees of company A, and set a condition that only the to do’s they’ve entered are visible for users with that role. But this sounds way too complicated. Is there another, easier way to achieve this?
Thanks ik advance!
Hi there, @jorritleemans93… as with just about everything in Bubble, you can achieve what you have described in a number of ways, but here is how I would likely go about it.
I would have a data type for Company, and I would have a Users field in that data type that is a list of users who are part of a particular company (this field won’t be used to determine the to do’s a user can see, but it won’t hurt to have an easily accessible list of users who belong to a certain company).
I would then have a Company field (of type Company, of course) on the User data type and on the To Do data type. So, each user and each to do is tagged with a company, giving you an easy way through both privacy rules and search constraints to show the right to do’s to the right users (at the privacy rule level, something like This To Do’s Company is Current User’s Company, and when searching for to do’s, a constraint like Company = Current User’s Company).
I’m sure others could come along and give you different (better?) ways to do it, so take what I have described above as food for thought, and I hope it helps.
Best…
Mike