All posts

Guides

·

·

6 min read

A practical guide to organizations and roles

How to model teams, invitations and permissions so your B2B plan doesn't need a rewrite in a year.

Portrait of Aarav Mehta

Aarav Mehta

Head of Engineering

white concrete pillar during daytime

Most products start with one user per account. Then a customer asks to invite a colleague, and the data model that made sense on day one starts to bend. Here’s the structure we recommend, and the one Lintel’s organizations are built on.

Users belong to organizations, not the other way round

Keep users global. A person has one identity and can be a member of many organizations, each with its own role. The consultant who works with three of your customers signs in once and switches between them, instead of juggling three passwords.

Start with three roles

Admin, member and billing cover most early needs. Resist adding more until a customer asks. When they do, add permissions rather than roles: org:invoices:approve is easier to reason about than a fifth role with a vague name.

Check permissions, not roles

In your code, ask whether a user has a permission, never which role they hold. When you later let customers define their own roles, none of your checks have to change.

Open the door.

Free for your first 5,000 users. Live in about four minutes.

Open the door.

Free for your first 5,000 users. Live in about four minutes.

Open the door.

Free for your first 5,000 users. Live in about four minutes.

Create a free website with Framer, the website builder loved by startups, designers and agencies.