AlmondTill/G3N API

On this page

rolePermissions

query · in the family Reading your records

What it does

The full picture of what ONE role may and may not do at an organization — before anyone holds it (the guide’s “show this guide for a different role”).

THE PEEK SWITCH read: the SAME compile as effectivePermissions over ONE in-tenant role — every registry operation evaluated for that role alone. READ semantics: a cross-tenant or absent role/organization reads null — existence never leaks.

What happens

Reads only — changes nothing.

Who may call it

Capability area: Reading your records — Looking up and listing the records of your organization.

Arguments

NameTypeRequiredNotes
roleIdID ID!yesNo further notes.
organizationIdID ID!yesNo further notes.

Returns

EffectivePermissions — The verification mechanism: (user, org) → the FULL effective-permission map + which role contributed each descriptor, computed by the SAME evaluator the future gate uses (preview ≡ enforcement — no second mechanism, no drift). Evaluates DESCRIPTORS ONLY: it does NOT compose the account-capability / dark-org / user-lifecycle gates.

Example request

query ExampleRolePermissions($roleId: ID!, $organizationId: ID!) {
  rolePermissions(roleId: $roleId, organizationId: $organizationId) {
    roles {
      roleId
      caption
      status
    }
  }
}

Variables:

{
  "roleId": "01900000-0000-7000-8000-164531fc0000",
  "organizationId": "01900000-0000-7000-8000-44b781470000"
}

Example response

{
  "data": {
    "rolePermissions": {
      "roles": [
        {
          "roleId": "01900000-0000-7000-8000-164531fc0000",
          "caption": "Blue jeans",
          "status": "<status>"
        }
      ]
    }
  },
  "extensions": {
    "at": {
      "callId": "01EXAMPLE-CALL-ID",
      "version": {
        "requested": null,
        "serviced": {
          "name": "genesis",
          "number": 0
        }
      }
    }
  }
}

Errors this call can answer