Partitioning users by account

I’m starting to think about how I might organise users around workspaces. The idea is not well developed… but here it is…

I imagine a scenario where admins (workspace owners) pay for a workspace and then invite collaborators (workspace participates) in to that workspace. I want workspaces to be “partitioned” so that, with a single app there can be 100s of isolated workspaces.
Any user can start a workspace and they can invite any other user to collaborate.

Is this feasible with Glide? Are there limitations that would make this a horrible idea?

No limitations. It all depends on how you structure the data.

Assuming that you want to do this securely, then the best approach would be to utilise Roles as Row Owners. That is, all users in each shared workspace would share the same Role, and that role would be used as a Row Owner value for that Workspaces’ data.

Straight away, you run into some limitations with this approach. There is a hard limit of 9 on the number of roles that can be assigned to an individual user, so no user could belong to more than 9 workspaces. If your data source is Glide Tables, that limit is in fact 1, as there is no way to assign multiple roles to a single user when the User Profile table is a native table.

So assuming that you don’t want to limit the number of workspaces per user, then using roles as row owners won’t fly. And even if you could use this approach, then the cost implications (all users would be private users) may make it unfeasible.

The next best option would be using multiple row owner columns, with one column for each workspace user (per workspace). This means you’d either need to dynamically create new columns as users are added to workspaces, or set a hard limit on the number of users per workspace and create that number of columns up front.

There is no way to dynamically add columns to native tables, so if you wanted to take that route then you would need to use an external data source such as Google Sheets or AirTable, and then setup appropriate automations to handle it.

So is it feasible?

yeah, maybe… but you’ll need to jump through plenty of hoops.

1 Like

Nope… I disagree :wink: It is very easy and has no limits. You can connect multiple spreadsheets or have unlimited rows with data mapping. But if you don’t need more than 25K rows, just add the workspace owner ID to each participant ID… that’s all.

If I don’t use row owners would I be risking data leaks in the future?

When you use row owners, then the only the data that’s owned by the user will be sent to their device. Without row owners, then all data will be sent to the user’s device.