انتقل إلى المحتوى الرئيسي

How permissions work

Every "can I do this?" question in Noema AI is answered the same way: by checking a relationship between you and the thing you are trying to touch.

There is no list of checkboxes attached to your account. Instead, access comes from two layers that stack on top of each other.


The two layers​

Layer 1 answers: Can I open the Users page? Am I allowed to create a workflow at all?

Layer 2 answers: Can I edit this assistant? Can I run that workflow?

You need both. Being allowed to create workflows does not let you edit someone else's workflow — and being the owner of a workflow does not get you into the LLM Settings page.


How a decision is made​

Admins and Platform Admins short-circuit most item-level checks — they are written into the rules as an override on nearly every entity.


Where the rules actually live​

The single source of truth

All rules are defined in one file: authorization/model.fga. It is an OpenFGA authorization model. Neither the backend services nor the web app define permissions of their own — they only ask this model.

LayerWhat it doesWhere
Authorization modelDeclares every permission and who gets itauthorization/model.fga
Kotlin servicesEnforce identity and document rules via checkCanRead / checkCanUpdate / checkCanDelete / checkCanCreatekotlin/identity, kotlin/document
Chat service (Python)Enforces assistant, workflow and chat rules; serves the permission APIchat-service/app/permission
Web appHides buttons, pages and menu items you cannot usechat-ui

How the web app finds out​

The web app learns your permissions through two channels:

ChannelCarriesUsed for
Your sessionYour organization permissions, as one listPage guards, navigation menu, create buttons
GET /api/permission/{EntityType}:{entityId}Your permissions on one specific itemEdit, delete, share and run buttons on rows and cards
The UI is a convenience, not the lock

Hidden buttons are there to keep the interface clean — they are not the security boundary. Every action is checked again by the backend when it is called. If a button is hidden but you call the API directly, the service still refuses.


A note on service accounts​

There is a sixth role, application, which is not assignable to people. It belongs to service principals — the backend services calling each other. Requests made by an application principal bypass several user-level checks by design.


Where to go next​