API · v1 · stable
CODEMETA OSDeveloper Center
EN
Open console
Concept

Permissions & scopes

Reading time · 7 minUpdated · 1 May 2026

Authorization in Codemeta OS happens in two steps. Both must pass for a request to go through.

Step 1: Functional permissions

Permissions are role-based and control what an account may do. Examples:

  • ticket_view, ticket_create, ticket_update, ticket_delete
  • kb_article_publish, kb_article_archive
  • billing_manage, customer_tenant_manage

Permissions come from the roles assigned to an account in a tenant. Permission changes take effect promptly.

Step 2: Data scopes

Data scopes control which records an account may see or modify. Possible values:

  • all – all records of the tenant
  • assigned_to – only records in which the account is entered as assignee
  • team_member – records whose team the account belongs to
  • customer_contact – records to which the account is linked as a customer contact
  • created_by – only records the account created itself

Which scope applies depends on the entity. Tickets support all five, contracts often only all and assigned_to.

Conditional mode

Some entities allow conditional scopes – different rules depending on a field value. This makes it possible to express, for example: “I see all invoices, but only my own ticket attachments”. Conditional scopes reference a scopeableField from the entity configuration.

Order of evaluation

  1. Does the account have permission for the operation? If not → 403.
  2. Does the data scope cover the requested record? If not → 403.

Permissions and modules

Some permissions only make sense if the tenant has licensed a specific module (e.g. lms_course_publish without an LMS license). The license gate applies before the permission check – you then receive 402 Payment Required with type=https://codemeta-os.de/probs/license-required.

Search