Permissions
Who may do what, modelled once and enforced everywhere
Define roles in Fractal Studio and decide, per entity, command, query and even per field, what each role may see and change. The generator turns that model into checks in the API, into a portal that only offers what a role may open, and into tests that prove it role by role.

Layers of control
Each layer narrows what the one above allows. All of them come from the same model.
-
Roles with a rank
Roles are part of your model in Fractal Studio, each with an order. A user may hand out a role they hold, or one ranked below their own, so an administrator can invite ordinary users without being able to create other administrators. The same rule applies to user accounts, API keys and service accounts.
-
Entity, command and query permissions
In default mode a role gets one set of rights for every entity: list, read, create, update and delete. Switch a role to advanced mode and you set those rights per entity, plus which commands it may run and which queries it may read. In advanced mode, a new entity stays closed to a role until you grant it.
-
Field-level read and write
Per field, name the roles that may read it and the roles that may write it. A field a role may not read comes back empty and is left out of search. A field a role may not write keeps its stored value, whatever the request sends.
-
Account scoping
Every role carries a record filter. By default it limits a role to records of its own account; presets also cover "only my own records". The filter is filled in from the caller's token on every request, and values from the token can never change what the filter means.
-
Scoped tokens and API keys
OAuth scopes narrow a token per resource and action, down to a single command. A service account needs explicit scopes and is checked against its scopes and its roles, and a request that cannot be matched to a scope is refused. An API key carries exactly one role, which its creator must hold.
-
Portal and AI follow the same rules
The generated portal only shows menu items for what a role may list, and a field it may not read arrives empty. The MCP server calls the API with the signed-in user's own token, so an AI assistant can do exactly what that user can, and nothing more.
From model to enforced rule
You describe access in Fractal Studio. The generator writes the enforcement and the proof.
-
Step 1:Define your roles
In Fractal Studio, add the roles your application needs, put them in order of privilege and pick a record filter for each, such as "own account" or "own records". -
Step 2:Set what each role may do
Tick list, read, create, update and delete for all entities at once, or switch a role to advanced mode and set rights per entity, per command and per query. Add read and write roles to the fields that need them. -
Step 3:Generate
The generator turns the model into a permission check on every API call: each list, read, create, update, delete, command and query is checked against the caller's roles, scopes and account before it runs. Field rules are applied where data goes in and out. -
Step 4:Get tests per role
For every entity and every role, the generated API tests expect exactly the outcome the model describes: allowed where you granted it, refused with a 403 where you did not, and empty fields where a role may not read them. -
Step 5:Change it and regenerate
Adjust a role in Studio and regenerate. Checks, portal menu and tests move together, while your own code stays in place.
One model of who may do what
In most applications, access rules end up scattered: a check in this endpoint, a hidden button in that screen, a filter someone remembered in one query and forgot in the next. Nobody can say with certainty what a given role can actually reach.
Fractal keeps that answer in one place. Roles, their rights per entity, command, query and field, and the records they may see are part of the model in Fractal Studio. Everything that needs to know, from the API and the portal to the AI tools and the test suite, is generated from that same model.
That makes access reviewable. You can read a role's rights in Studio instead of in code, and the generated tests show that the running application agrees. When requirements change, you change the model, not a dozen files.
Permission questions
What is the difference between default and advanced mode?
In default mode a role has one set of rights that applies to every entity. In advanced mode you set the rights per entity, including which commands the role may run and which queries it may read. Advanced mode is closed by default: an entity you have not granted stays refused.
Can a role be limited to its own records?
Yes. Every role has a record filter. The default keeps a role inside its own account, and you can narrow it further, for example to records the user created.
Is hiding something in the portal enough?
No, and it is not what protects your data. The API checks every request itself. The portal only leaves out what that check would refuse, so users are not offered screens they cannot use.
Can an integration get less access than a person?
Yes. OAuth scopes narrow a token down to a single resource, action or command. A service account must name its scopes and is also bound by its own roles, so it can never do more than those allow. An API key carries one role, which its creator must hold.
Do AI assistants get their own permissions?
No. The generated MCP server forwards the signed-in user's token to the API, so an assistant works with exactly that user's roles, scopes and account.
How do we know the rules actually hold?
The generator writes API tests per role and per entity that expect the outcome the model describes, including refusals and hidden fields. They run with the rest of your test suite.
See your roles become working rules
We will model a few of your roles live and show the checks, the portal and the tests that come out.