I’m trying to identify a bug that’s happening within my app but can’t seem to figure out why or how it’s happening.
- CallBoss is an app that HVAC contractors use to book appointments. It gives the person answering the call with a workflow of what to say at each step of an incoming phone call.
- There are multiple users logging calls at the same time
- Everyone once and while, if two users are on the same page, lets say the 'Contact ', the information from one user will be entered on the other’s users screen.
Here is what the screen looks like:
If two users are on the same page at once, they report that the information can get filled out based on what the other is doing. This seems strange, given they have different accounts, but I might be misunderstanding how their accounts impact what they can and cannot edit.
Here is an example of how the Contact page is set up: callbosstest | Bubble Editor
Here’s how I structure the “initial content” of each field.
When each user is updating a recording, they are always updating a record that is 1) created by them and 2) they’re only updating the most recent created by themselves.
Each user is only editing a single record as a time, so this works for each use, but if they are on the same page, the data can get criss-crossed.
- Any idea how this is happening?
- Is there a potential fix?
@gf_wolfer we spoke about this a few years ago and if memory serves me, you had a different way of structure the information of a call (record) that might solve this problem.
@topherwilliams This usually happens when you use :first item without a constraint so everyone is editing the same item. In this case, you have a current user constraint. A few things to check:
- are the 2 users logged in with different emails? What is the current user thing evaluated to when data gets mixed up
- is there a set state action / parent group’s thing / current page thing that can show another thing’s data
I suggest setting the Privacy roles on your data. Right now they are all empty. This might help but also is a good security measure. Right now all your data is potentially exposed.
Also noticed that these elements are not restricted by User, so this will cause a user to change someone else’s data. or really, just display someone’s data:
I’m fairly new to this but in my opinion security roles will only become useful once users can be assigned to a group. At least for an enterprise type app like this. I would create a record unique to the users at the start of the work flow and filter by user then :first or whatever you need to identify the record.
Here is a good post about privacy for you to take a look at. Are your apps secure? We all depend on it
Hope that helps.
Neerja is on the right path here - I am guessing two people are using the same login information which means the are in fact the same ‘current user’.
Thanks for tagging me, should be easy for us to diagnose tomorrow and we will have a couple options to fix things depending on your app priorities.
I also noticed your workflow uses a feature that is deprecated. See this post: Create if thing doesn't exist option is no longer available
I wonder if this might be causing issues possibly as well.
Thank you. I stopped using this feature.
Thanks for your insights around security and roles, what roles would you suggest I use?
Just give permissions to those that need it. If the user is only accessing their information then just make sure current user is the one who created the data.
Depending on how you set up your data you can create groups that have access to certain data as well.
There are a lot of different ways to do it, just need to do what’s best for the way you have it set up and the way you want your users to access the data.
No privacy roles is not good though considering there are ways to hack into it and see the data.