Stop asking who the owner is: in our new access model, no role is special
Almost every product has a line like this somewhere:
if (user.isOwner) {
showSettings()
}
It reads well and is easy to write. In an access system with custom roles, it’s wrong.
Why “is owner” breaks
In our new access model, a role is just a set of permissions. “Organization owner” is only one of them. A customer can make a custom role with the exact same permissions. They can call it “Platform admin” and give it to their platform team.
Now the check above hides settings from people allowed to change them. The permission system says yes. The page says no. The customer files a support ticket that’s hard to explain. The reverse is worse. A check granting owners something extra hands out access the permission system never recorded.
So our team set a rule for every organization on the new model. No role gets special behavior. Nothing branches on holding a particular role. A page that shows settings asks the question it actually means: “can this person change organization settings?” It lets the permission system answer.
What about lockout?
Preventing lockout was the one place a special role seemed necessary. Someone always has to be able to fix access.
That protection lives on a group, not a role. Every organization has an admin group that can’t be emptied. That break-glass always works, no matter what any role is called or what it contains.
A rule people have to remember is a rule people forget
It’s easy to agree with the rule. It’s just as easy to break it. Owner checks live in muscle memory and in old code people copy. Coding agents produce them too when they pattern-match on the codebase. So we didn’t stop at writing it down.

- A lint rule in the console. It fails the build on the usual suspects: reading the permission level, comparing with “Owner” or using the old owner-only hooks and wrappers. Its message names the right alternative.
- A matching rule for the backend, running as a blocking CI step to catch role identity checks there.
- Allowlists that only shrink. A handful of places legitimately mention a role, like a dropdown that lets you pick one. Those go in by name. Each entry says why it stays or which ticket removes it. A fix deletes its own entry. Nobody adds an entry to get a build green.
The fastest review comment is the one the build already made.
The rules have limits, though. The backend rule, for example, can’t see a role compared inside the same module that defines it. That case still needs a human eye. We wrote that down right next to the rule.
The habit behind it
This came out of a pattern I’ve started taking seriously. When a reviewer catches the same mistake twice, a constraint is missing. Fix it the first time. The second time, ask whether a lint rule, a test or a type could have caught it. Add that instead of another comment.

It works especially well with coding agents. An agent that keeps writing owner checks isn’t being careless. It’s copying what it sees. Correcting it in every review doesn’t scale. A failing build teaches both the agent and every person the same thing in the same second.
If you have roles in your product
- Check permissions, not roles. Ask the question you mean: can this person do this thing here?
- Keep lockout protection out of roles. Tie it to something that can’t be renamed or emptied.
- Enforce it in the build, with an allowlist that only gets shorter.
- Write down what your rules can’t see, so reviewers know where to look.

It’s the same idea as keeping permissions dumb and the hints smart. The model stays simple and predictable. Everything around it does the helping.