Users, Organisations, Projects

Hi everyone!

I’m building an app where:

Users belong to an Organisation
Each Organisation has multiple Projects
Each Project has various related data types (e.g. reports, mix designs, documents, etc.)

The challenge I’m running into is with permissions and visibility. Right now, access is structured through the Organisation - so when a User wants to view Project data, the app checks their Organisation first, then the Project, then the data type.

It’s starting to feel too complex. I’m wondering:

Is this a common structure or is there a better way?

Should I simplify and assign access at the User > Project level directly, and skip the Organisation layer for permissions?

Any best practices for this kind of structure?

Would love to hear how others have handled similar setups. Happy to clarify anything if it’s not clear!

Thanks so much :blush:

I’m not sure of the specifics of your app, but you can consider satellite fields in the Project table. So your project would have a list of all the users that can access it without going through Organisation.

And if permissions change (user is added/removed from an Organisation) you can use database triggers to keep permissions up to date.

Petter Amlie has a good blog post about it.