Field permissions

Overview

Kompass has two layers of access control:

  1. Permission groups: control whether a user can use a feature at all (for example view projects, change invoices). See the Permissions reference for the full list.
  2. Field permissions: a finer-grained layer that restricts individual fields within a record. For example, a user might be allowed to view a project but not see its price  .

Field permissions sit on top of permission groups. If a user does not have the model-level permission they cannot see the record at all. Field permissions only kick in once that base check has passed: they decide which individual fields are visible and editable.

Field permissions are currently available for Projects, Organizations, Contacts and Proposal Items. The full field lists are under Which fields can be restricted below.

Under the hood this layer is an attribute-based access control (ABAC) system, and you may see the term ABAC in release notes and technical documentation. The design follows the NIST ABAC model (SP 800-162), with rule evaluation based on the OpenID AuthZEN pattern. This article uses the simpler name: field permissions.

The four words you'll keep seeing

Every field permission rule is built from four ideas. You'll see them throughout this article, on the Field permissions tab and in the JSON the rules are stored as, so here they are in plain English first.


Think of a single rule as one sentence:


"Who is allowed to do what to which field, and when."


Each part of that sentence has a name:


Term In plain English The sentence part In the JSON, this is the key… Where you find / set its value
Resource Which field the rule is about …to which field resource The field you want to protect, written as Model.field  . For example: Project.price , Client.notes , Contact.email . A single user-defined field is written as Model.udf.field_name . The full list of protectable fields is under Which fields can be restricted below.
Action What someone is trying to do to that field …to do what… action Always one of two words: read  (see the field) or write  (change the field). You write a separate rule for each.
Subject groups Who the rule applies to Who… subject_groups The permission groups the rule applies to: the same groups you already assign users to. On the Field permissions tab you pick them by name, or pick Everyone. In the stored JSON each group is its ID number, and everyone is "*".
Condition (optional) When the rule should apply …and when condition An optional extra test so a rule only applies to records in a certain state, for example only after a proposal item has been accepted. If you leave it out, the rule always applies. Covered fully under Conditional rules below.

Two more words complete every rule:


Term In plain English In the JSON, this is the key… Possible values
Effect Whether the rule grants access or removes it effect allow  (give access to the listed groups) or deny  (take it away from them).

So a full rule reads as: "Allow (effect) groups 5 and 6 (subject_groups) to read (action) Project.price (resource)."


{
  "resource": "Project.price",
  "action": "read",
  "subject_groups": [5, 6],
  "effect": "allow"
}

A quick note on where all this lives. These rules are set on the Field permissions tab of the Projects, Clients, Contacts and Quote items pages in Configuration. The full step-by-step is under Configuring rules below. The examples in this article show each rule as the JSON it is stored as, which is also what you edit if you use Kompass Admin instead.

How rules are evaluated

For each field that has a rule configured, Kompass performs the following steps when a user reads or writes a record:

  1. Find every rule whose resource matches the field (for example Project.price  ).
  2. Discard rules whose condition does not match the record being accessed (see Conditional rules below). Rules without a condition always apply.
  3. If any remaining deny   rule matches the operation and one of the user’s groups (or the wildcard "*"  ), the operation is denied. Deny always wins over allow.
  4. If no allow   rule remains for the field, the operation is permitted. Deny rules only take access away from the groups they name; they do not close the field to everyone else.
  5. From the remaining allow   rules, if none matches the operation, the operation is denied.
  6. If at least one of those matches one of the user’s groups (or the wildcard "*"  ), the operation is permitted.
  7. Otherwise, the operation is denied.

What “denied” looks like

  • Read denied: the field is silently omitted from the API response for the record's detail view, and the frontend does not display it there. This does not apply to every response: the Organization, Contact and Proposal Item list serializers do not enforce field permissions, and conditional rules do not apply when a list is serialized. A field can therefore still appear in some list responses. Do not rely on a read rule to hide a field from every response or screen.
  • Write denied: the field becomes read-only. Requests that include it succeed (HTTP 200) but the value is ignored; no 403 is returned. This way a save that touches several fields still applies the changes the user is allowed to make, instead of failing outright. CSV imports behave differently: a row that would change a field denied by a conditional rule refuses the whole upload with a 403.

Default behavior

The default is permissive. If a field has no rules mentioning it at all, every user with the model-level permission can read and write it normally. A field only becomes restricted once you write at least one rule about it.

Once you write any allow   rule for a field, that field becomes opt-in: only the groups explicitly listed in an allow   rule for the appropriate action can access it. Users not covered by any matching rule lose access. Deny   rules behave differently: they only exclude the groups they name and leave everyone else unaffected (see Deny rules below).

Which fields can be restricted

Field permissions are being rolled out gradually. As of November 2026 they cover four models:

  • Project: most fields, including price  , price_computed  , hours_actual_computed  , hours_budget_computed  , all of the lifecycle status fields (accepted  , quoted  , invoiced  , …), address fields, references, tags, UDFs, geometries and notes. A read rule on a phase's date, user or notes field (for example quoted  , quoted_by   or quoted_notes  ; for a custom phase, its export name, optionally followed by _by   or _notes  ) also applies to the project's list of phases, which the API and exports include: the restricted value is not shown there either. The Registered, Requested and Accepted phases are the exception: their dates and users stay visible in that list, and only the Registered and Requested notes follow read rules.
  • Organization: name, address, contact, manager, parent, type, tags, UDFs, notes, financial-relevant flags.
  • Contact: name, address, email, phone, position, opt-out, tags, UDFs.
  • Proposal Item: name, price, price type, quantity, the nested cost build-up (cost_items  ), lifecycle fields (accepted  , closed  ), service, VAT rate, visibility, address fields, references, tags, UDFs and notes.

The udf   entry in each list gates every user-defined field on the model at once. To restrict a single user-defined field, see Gating a single user-defined field below.

Other models (invoices, expenses, diary entries, tasks, leave) do not support field permissions yet. For those, continue using the existing permission groups.

Configuring rules

Rules are set per Org, on the Field permissions tab of each module that supports them. You see the tab only if you can change that module's configuration.

  1. In the new design, open your user menu and choose Configuration.
  2. Choose Projects, Clients, Contacts or Quote items, depending on which records you want to restrict, and open the Field permissions tab.
  3. If you have access to more than one Org, choose the Org you are configuring in Org. Rules apply to that Org only.

Field permissions tab on the Projects page, with one rule

  1. Click Add rule and fill in the new row:
    • Field: the field the rule is about.
    • Action: See (read) or Edit (write).
    • Effect: Allow or Deny.
    • Groups: the permission groups the rule applies to, picked by name, or Everyone. Picking Everyone removes the other groups, and picking a group removes Everyone.
  2. To make the rule apply only to records in a certain state, tick Only when a field is set or empty, then choose the Condition field and whether it is set or is empty (see Conditional rules below).
  3. Add further rules the same way, then click Save. Reset discards your changes.

Two rules: the first hides the price from one group, the second stops everyone changing it once the accepted date is set

In the example above, the first rule hides the price from the Lite User group. The second applies only once the project's accepted date is set, and then denies everyone Edit on the price field. A project's price is calculated from its quote items, so this rule does not stop the total changing when a quote item changes; to freeze the amounts themselves, put the rules on the quote item, as in Example 5. The order of the rules makes no difference. To remove a rule, click the bin icon at the right of its row.

Every rule needs a field and at least one group, and a condition needs its field. Until each row is complete, the row is outlined in red, a warning asks you to complete the highlighted rules, and Save stays disabled. If Kompass still rejects the rules when you save, an error explains which rule is wrong.

An incomplete rule outlined in red with the message Choose a field and at least one group

A rule that names a group which has since been deleted shows it as Deleted group with its ID number. Remove it from the rule. If you leave the tab or switch Org with unsaved changes, Kompass asks whether to Discard them or Keep editing.

Checking access before you save

Below the rules, Check access shows what the rules on screen, including changes you have not saved, do to the groups you choose. Pick one or more groups and click Check. Each field with a rule is listed with two results:

  • See: Visible, Hidden, or Depends on the record when a conditional rule applies.
  • Edit: Editable, Read-only, or Depends on the record.

Tick Show all fields to list the fields without rules as well. The check covers field permissions only: a group also needs the module's permissions, and other permissions, such as access to financial values, can still hide a field.

Check access for the Lite User group: price is hidden and read-only

Editing the rules in Kompass Admin

The same rules can also be edited as JSON in Kompass Admin, in the Field settings of the module's configuration for the Org. The tab and Kompass Admin change the same rules. This needs access to Kompass Admin, which permission to change a module's configuration does not give; if you do not have it, ask Kompass support. The first rule for a user-defined field that exists only in a setup chosen for an individual record, and so is not listed on the tab, can only be added there (see Gating a single user-defined field below).

Rule shape

Each rule is stored as JSON. The examples in this article use this form, and it is what you edit in Kompass Admin. On the tab, resource is Field, action is Action (read is See, write is Edit), effect is Effect, subject_groups is Groups and condition is Only when a field is set or empty.

{
  "rules": [
    {
      "resource": "Project.price",
      "action": "read",
      "subject_groups": [12, 34],
      "effect": "allow"
    }
  ]
}

Each rule has four required fields, plus one optional field:

Field Description
resource   The gated field, written as Model.field  . For example Project.price  , Client.notes  , Contact.email  . Nested structures are gated as a whole via their field name: for example QuoteItem.cost_items   covers the entire cost build-up. The one exception is user-defined fields, where a single field can be gated on its own as Model.udf.field_name (see Gating a single user-defined field below). Any other dotted path is rejected.
action   Either "read"   or "write"  . A separate rule is required for each.
subject_groups   Either a list of group IDs (integers, not names), or the wildcard string "*"   to match every authenticated user.
effect   Either "allow"   or "deny"  . An allow rule grants access to the listed groups; a deny rule takes it away from them. Deny always wins over allow. See Deny rules below.
condition   Optional. Restricts the rule to records in a particular state, for example only once the accepted   date is set. See Conditional rules below.

Finding group IDs

You need group IDs only when you edit the JSON in Kompass Admin: the tab picks groups by name. Open /admin/auth/group/ in Kompass Admin. Each group’s database ID is shown in the URL when you open it. Rules reference these IDs, not the group names, so renaming a group will not break its rules.

Gating a single user-defined field

User-defined fields can be gated one at a time. On the Field permissions tab, Field lists the user-defined fields in the setup the Org uses for that module (its schema, chosen on the module's custom fields tab; see User Defined Fields (UDF)), under the field's label, together with any user-defined field a saved rule already names. A field is listed only if its name starts with a letter or underscore and contains only letters, digits, underscores and hyphens; a rule cannot name any other field. When two fields share a label, the field name follows it in brackets. User-defined fields cannot be chosen as a Condition field. A record can use a different user-defined field setup from its Org; a field that exists only in that other setup is not listed, so add its first rule as JSON in Kompass Admin; the field then appears on the tab. In the JSON, the field name from the user-defined field setup is the last part of the resource:

{
  "resource": "Project.udf.effective_multiplier",
  "action": "read",
  "subject_groups": [5, 6],
  "effect": "allow"
}

Three things to know:

  • A user who may not read the field does not see an empty box: the field is removed from the record and from the form, so nothing is drawn for it. Gate the section heading (the divider field) in the same way to hide a whole block of fields.
  • Saving is safe. When a user who cannot see the field saves the record, the stored value is kept rather than cleared.
  • The field name is not checked when the rules are saved, because each record can use a different user-defined field setup. A rule naming a field that does not exist simply has no effect, so check the spelling against the setup.

Gating applies to the Kompass screens and the API. Proposal item exports and reports, and organization exports, respect it too; scheduled exports and other reports are not filtered.

Conditional rules

A rule may carry an optional condition   that restricts it to records in a particular state. The rule then only takes part in the decision for records that match the condition; for records that do not match, the rule is ignored entirely.

{
  "rules": [
    {
      "resource": "QuoteItem.cost_items",
      "action": "read",
      "subject_groups": "*",
      "effect": "allow",
      "condition": {"field": "accepted", "is_set": true}
    },
    {
      "resource": "QuoteItem.cost_items",
      "action": "write",
      "subject_groups": [6],
      "effect": "allow",
      "condition": {"field": "accepted", "is_set": true}
    }
  ]
}

A condition has two required keys:

Key Description
field   The field whose state is tested, on the same model as the rule's resource  . It must itself be a gateable field; the admin form validates this.
is_set   true   matches records where the field holds a value; false   matches records where it is empty. Empty means null, an empty string, zero or false: a boolean field that is switched off counts as not set.

Two consequences follow from "ignored entirely":

  • A field whose rules are all conditional stays completely open on records that do not match the condition. In the example above, anyone with the model-level permission can edit the cost build-up while the proposal item is unaccepted; once the accepted   date is set, only group 6 can.
  • When there is no record to test, in particular when creating a new record, conditional rules do not apply and the field stays open. Conditions lock down existing records; they cannot gate creation.

Deny rules

Allow rules work as opt-in lists: once a field has one, only the listed groups keep access. A deny   rule works the other way round: it takes the named action away from the named groups and leaves everyone else untouched.

{
  "resource": "Project.price",
  "action": "write",
  "subject_groups": [9],
  "effect": "deny"
}

With this single rule, everyone with the model-level permission can still read Project.price  and change it in the project import, except group 9, for whom the field is read-only. Three properties to remember:

  • Deny wins over allow. If a user's groups match both an allow and a deny rule for the same field and action, the deny rule applies. This lets you write a wildcard allow with exceptions.
  • Deny rules do not make a field opt-in. A field whose only rules are deny rules stays open for everyone the deny does not name. This makes deny the natural choice for "everyone except group X"; compare Examples 4 and 6.
  • Denying read also blocks writing. A read-denied field is removed from the response entirely, and values sent for a field that is not present are ignored on save. So a deny rule for read   takes both actions away from its groups, regardless of the write rules. The reverse does not hold: denying write   leaves the field visible but read-only.

Conditions work on deny rules exactly as on allow rules: a deny rule with "condition": {"field": "accepted", "is_set": true}   only takes effect once the record is accepted.

Worked examples

Each example shows the rules as stored JSON. To set them up on the Field permissions tab, add one row per rule, picking the groups by name instead of by ID.

Example 1: Hide project price from junior staff

Assume your organization has these groups:

  • Group 4   is Junior staff
  • Group 5   is Project managers
  • Group 6   is Finance

You want junior staff to view projects, but not see the price   field. Project managers and finance should still see it.

{
  "rules": [
    {
      "resource": "Project.price",
      "action": "read",
      "subject_groups": [5, 6],
      "effect": "allow"
    },
    {
      "resource": "Project.price",
      "action": "write",
      "subject_groups": [5, 6],
      "effect": "allow"
    }
  ]
}

Result:

  • Junior staff: price   is omitted from the project API response: the field does not render in the UI at all. Attempting to set it via API silently fails.
  • Project managers and finance: the field stays visible as before.

Example 2: Read-only financials for everyone except finance

Allow everyone to see a proposal item’s price, but only finance can change it.

{
  "rules": [
    {
      "resource": "QuoteItem.price",
      "action": "read",
      "subject_groups": "*",
      "effect": "allow"
    },
    {
      "resource": "QuoteItem.price",
      "action": "write",
      "subject_groups": [6],
      "effect": "allow"
    }
  ]
}

The wildcard "*"   on the read rule grants every user read access; the write rule only matches finance (group 6). Other users get the field shown in the UI but as read-only.

Example 3: Hide organization notes from external collaborators

External users (group 9) can see organizations but should not see internal notes or the manager field. Internal staff (groups 1, 2, 3) keep full access.

{
  "rules": [
    {
      "resource": "Client.notes",
      "action": "read",
      "subject_groups": [1, 2, 3],
      "effect": "allow"
    },
    {
      "resource": "Client.notes",
      "action": "write",
      "subject_groups": [1, 2, 3],
      "effect": "allow"
    },
    {
      "resource": "Client.manager",
      "action": "read",
      "subject_groups": [1, 2, 3],
      "effect": "allow"
    },
    {
      "resource": "Client.manager",
      "action": "write",
      "subject_groups": [1, 2, 3],
      "effect": "allow"
    }
  ]
}

The external group is not listed on any rule for these fields, so the fields are omitted from the API response when an external user fetches an organization. Internal staff are unaffected.

Example 4: Hide contact phone numbers from a specific group

{
  "rules": [
    {
      "resource": "Contact.phone_mobile",
      "action": "read",
      "subject_groups": [1, 2, 3, 5, 6],
      "effect": "allow"
    },
    {
      "resource": "Contact.phone_office",
      "action": "read",
      "subject_groups": [1, 2, 3, 5, 6],
      "effect": "allow"
    },
    {
      "resource": "Contact.phone_mobile",
      "action": "write",
      "subject_groups": [1, 2, 3, 5, 6],
      "effect": "allow"
    },
    {
      "resource": "Contact.phone_office",
      "action": "write",
      "subject_groups": [1, 2, 3, 5, 6],
      "effect": "allow"
    }
  ]
}

Group 9 (for example, junior contractors) is excluded from both lists, so phone numbers disappear from their view of every contact. Other groups see and can change the phone numbers as before.

Example 5: Freeze accepted proposal items

Once a proposal item has been accepted, its financial fields should no longer change, except by finance (group 6). Unaccepted items should stay fully editable for everyone.

{
  "rules": [
    {
      "resource": "QuoteItem.cost_items",
      "action": "read",
      "subject_groups": "*",
      "effect": "allow",
      "condition": {"field": "accepted", "is_set": true}
    },
    {
      "resource": "QuoteItem.cost_items",
      "action": "write",
      "subject_groups": [6],
      "effect": "allow",
      "condition": {"field": "accepted", "is_set": true}
    }
  ]
}

Result:

  • Unaccepted proposal items: no rule matches, so the cost build-up is not gated at all. Everyone with the model-level permission can view and edit it as before.
  • Accepted proposal items: everyone can still see the cost build-up (the wildcard read rule), but only finance can change it.

Note the conditional read rule. Without it, the moment the write rule's condition matched, the field would count as gated and reads would be denied for everyone (see Forgetting the write rule above); the cost build-up would vanish from the UI on acceptance. When a conditional rule locks writes, pair it with a conditional read rule with the same condition.

Example 6: The same, with deny rules

Example 4 hides phone numbers from group 9 by listing every other group in an allow rule. A deny rule expresses this directly and keeps working when you later add new groups:

{
  "rules": [
    {
      "resource": "Contact.phone_mobile",
      "action": "read",
      "subject_groups": [9],
      "effect": "deny"
    },
    {
      "resource": "Contact.phone_office",
      "action": "read",
      "subject_groups": [9],
      "effect": "deny"
    }
  ]
}

Result: phone numbers disappear for group 9 (and, because denying read also blocks writing, group 9 cannot change them either). All other groups, including any created later, keep full access. With the allow-list approach of Example 4, a new group would be locked out until added to every list.

Common pitfalls

Forgetting the write rule

Read and write are evaluated separately. A rule for action: "read"   does not grant write: you need a second rule for action: "write"   if you want users to edit the field too. A read rule on its own also closes the field to writing, even for the groups it lists.

Conditional write lock without a read rule

The gating check runs per record: once any rule's condition matches a record, the field is gated on that record for both actions. A lone conditional allow rule for write therefore denies read to everyone as soon as the condition matches. Always pair such a rule with a read rule carrying the same condition (see Example 5). Conditional deny rules do not have this effect: a deny rule for write leaves the field visible.

Denying read when you meant read-only

A deny rule for read   removes the field completely for its groups, which also stops them writing it. If you only want to stop a group changing a field while still letting them see it, deny write  , not read  .

Locking yourself out

If you write a single read rule listing only group 5, every user not in group 5 (including admins) loses access to that field. Add admins explicitly to the subject_groups   list, or use "*"   on the read rule, to avoid this.

Using group names

This applies only to JSON edited in Kompass Admin; the tab picks groups by name. The subject_groups   list must contain integer group IDs, not group names. The form rejects group names when the configuration is saved; only integer IDs or the wildcard "*"   are accepted.

Mis-spelling a resource

On the tab you choose fields from a list, so this applies only to JSON edited in Kompass Admin. The form validates resource names against the gateable-field catalog. Typos like Project.Price   (capital P) or Project.priec   are rejected at save time. If you change the field name, the catalog version is what the validator expects.

User-defined field names are the exception. They are not in the catalog, so a rule such as Project.udf.anything   is accepted at save time and simply never matches. Check those names against the user-defined field setup.

Confusing “not in any rule” with “denied”

A field with no rules at all is open to every user with the model-level permission; field permissions do not restrict it. A field with at least one allow rule becomes restricted: users not covered by an allow rule are denied. Deny rules do not restrict a field this way; they only exclude the groups they name. To keep a field open while still gating others, either leave it out of field_settings entirely, or add a wildcard rule.

Auditing access

When troubleshooting why a user can or cannot see a field:

  1. Check that the user actually has the model-level permission (view project, etc.). Without it, field permissions are irrelevant.
  2. Look up the user’s groups in /admin/users/user/.
  3. Open the module's Field permissions tab for the user's Org and find the rules for the field in question. Check access with the user's groups shows the combined result.
  4. For each rule, confirm whether the user’s groups intersect with the rule’s subject_groups   and whether the action   matches the operation.

Limitations

  • Rules are configured per-org. There is no global ruleset.
  • Only the Project, Organization, Contact and Proposal Item catalogs are wired up. Other models will follow in later releases.
  • The Field permissions tab lists the user-defined fields of the Org's own setup, plus any a saved rule names. The first rule for a field that exists only in another setup is added as JSON in Kompass Admin, and user-defined fields cannot be used in a condition.
  • Field permissions control per-field visibility, not row-level access. To restrict which projects a user can see, continue using filtersets and permission groups.
  • When a read rule denies a user a phase date (for example quoted  ), the date is also hidden in the project's list of phases, in the API and in exports. In a CSV export, the phases_hidden   column lists which values were hidden.

Field permissions are a young feature and are being expanded gradually. If you need to restrict fields on a model that isn’t yet supported, or you want a deny-by-default workflow, contact Kompass support.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us