Skip to main content

PermissionMapResult

Permissions grouped by permission type (e.g. ASSET, PROFILE, SCOPE, SCOPE_GROUP, REPORT, REPORT_GROUP).

The shape of the value under each type depends on the permissions it contains:

  • when no permission of that type carries a subtype, the value is a flat array of permissions;
  • otherwise the value is an object keyed by subtype (e.g. PORTFOLIO, BUILDING, APPLICATION, RIGHT, POWERBI, METABASE, MIXED), where each subtype key holds an array of permissions. If some permissions of such a type have no subtype, they are grouped under the empty-string key ("").

[!warning] Type and subtype keys are dynamic: new keys may appear over time as the product evolves (for example REPORT_GROUP historically only exposed the POWERBI subtype, but report groups can now also hold METABASE and MIXED entries). Clients must iterate over every key present at both levels and must not rely on a hard-coded list of types or subtypes.

property name* object
oneOf

Permissions of a type that has no subtypes

  • Array [
  • uidstringrequired

    Unique identifier of the permission

    Example: 019619df-4768-76b3-8ab3-4414dcf29ff1
    codestringrequired

    Code of the permission

    Example: portfolio-123
    labelstringrequired

    Display label of the permission

    Example: Alpha Portfolio
    descriptionstringrequired

    Description of the permission (empty string when not set)

    Example: The Alpha Portfolio of buildings
  • ]
  • PermissionMapResult
    {
    "ASSET": {
    "PORTFOLIO": [
    {
    "uid": "0bb04f5b-bf5e-4950-acb1-0a63cf3431c1",
    "code": "b362b8cd-e105-41db-b131-0911fa559aee",
    "label": "Alpha",
    "description": "The Alpha portfolio of buildings"
    }
    ],
    "BUILDING": [
    {
    "uid": "0bb04f5b-bf5e-4950-acb1-0a63cf3431c3",
    "code": "b362b8cd-e105-41db-b131-0911fa559aef",
    "label": "B01 - Marseille",
    "description": ""
    }
    ]
    },
    "PROFILE": [
    {
    "uid": "0bb04f5b-bf5e-4950-acb1-0a3cf3431c6",
    "code": "acquereur",
    "label": "Acquéreur",
    "description": ""
    }
    ],
    "SCOPE": {
    "RIGHT": [
    {
    "uid": "0bb04f5b-bf5e-4950-acb1-0a3cf3431c7",
    "code": "stonal.asset.all",
    "label": "Access to all assets",
    "description": ""
    }
    ]
    },
    "SCOPE_GROUP": {
    "APPLICATION": [
    {
    "uid": "0bb04f5b-bf5e-4950-acb1-0a3cf3431c8",
    "code": "b362b8cd-e105-41db-b131-0911fa559aec",
    "label": "All",
    "description": ""
    }
    ],
    "RIGHT": [
    {
    "uid": "0bb04f5b-bf5e-4950-acb1-0a3cf3431c9",
    "code": "stonal.read-write",
    "label": "Read write",
    "description": ""
    }
    ]
    },
    "REPORT": [
    {
    "uid": "0bb04f5b-bf5e-4950-acb1-0a3cf3431ca",
    "code": "019837df-ab1d-7d13-956f-a4233f0b95a1",
    "label": "FICHE BATIMENT & SITE",
    "description": ""
    }
    ],
    "REPORT_GROUP": {
    "MIXED": [
    {
    "uid": "0bb04f5b-bf5e-4950-acb1-0a3cf3431cb",
    "code": "groupe_projet",
    "label": "Groupe projet",
    "description": ""
    }
    ],
    "POWERBI": [
    {
    "uid": "0bb04f5b-bf5e-4950-acb1-0a3cf3431cc",
    "code": "9cfa1e15-4f8b-49fc-a01e-2ff3f0d24a7d",
    "label": "Contrôle réglementaire",
    "description": ""
    }
    ]
    }
    }