---
title: "role permission holders · RUAL Documentation"
description: "Every subject under a root holding a permission at a path, by a role model the entity defines: who may open the doors of this room, who may edit this pr…"
canonical: https://docs.rual.nl/block-types/data/roles_holders
language: en
---

# role permission holders

This block is part of the [`data`](https://docs.rual.nl/block-types/data) group and was last modified in core [`v15.0.2`](https://docs.rual.nl/core-versions/150002).

Every subject under a root holding a permission at a path, by a role model the entity defines: who may open the doors of this room, who may edit this project, who an announcement to a role or to everyone in a channel reaches.

- model `value` required the name of a roles model the entity has (its setting roles_model_{model}), e.g. facilities, projects or chat

- root `value` the root's guid; optional when path is given

- path `array` scope ids from the root's first level to the leaf; empty is the root

- permission `value` empty: the members, or at a path the gate's holders

- limit `number` at most this many subjects; 0 is all

- subjects `array`

- count `number`

- success `condition`

- error `value`

Pages through the root's members against its compiled roles, the same evaluation as roles_check, in one call instead of a check per member. A model is the entity's setting roles_model_{model} (JSON) and nothing else: none is built in, and an entity without that setting has no such model (MODEL_NOT_FOUND). It names the stores of roots, members, roles and scopes and the fields linking them, and how each permission is decided. A path is scope ids from the root's first level down to the leaf (company → building → room; org → team → project; server → channel); it must be that chain under the root, else nothing is allowed; empty is the root itself. Overrides apply root to leaf, the deepest level naming the scope deciding: by "lists" (roles list scope ids they allow and deny, "*" is every scope, explicit beats "*", higher rank wins, a deny wins a tie, the owner ignores denies) or by "entries" (roles carry [{type, enabled, scopes}], read base role first then by rank; the last entry naming the deepest named level, or covering every scope, wins; none means the model's allowed_when_unset; the owner and a root whose type allows everything allow everything, staff their staff_allowed set). A role marked by the model's role.held_by_flag_field is held by exactly the members whose member.held_flag is set. The model's gate permission, if it names one, must hold at a path before any other. Results are cached per node and every write to the model's stores is heard at once. Without permission it returns the members, or at a path those holding the model's gate there. subjects are each subject once, in member order; limit > 0 stops after that many. A path that is not the root's has no holders. A root with more than 10000 members is refused with TOO_MANY_MEMBERS, never answered in part. error: MODEL_REQUIRED, MODEL_NOT_FOUND, MODEL_INVALID, ROOT_REQUIRED, ROOT_NOT_FOUND, PATH_INVALID, PATH_UNCHECKABLE, TOO_MANY_MEMBERS, ROLES_NOT_ENABLED.

## Version history

Introduced in [`v15.0.2`](https://docs.rual.nl/core-versions/150002).

- [`v15.0.2`](https://docs.rual.nl/core-versions/150002): block added in this release.

- [Back to `data`](https://docs.rual.nl/block-types/data): Return to the main group to view all sub-groups

- [Back to `roles`](https://docs.rual.nl/block-types/data?group=roles): Return to the group to view all blocks within this group
