bayesline.api.role_grant

Contents

bayesline.api.role_grant#

bayesline.api.role_grant(role: RoleType | str, *, enabled: bool | None = None, data: dict[str, Any] | None = None) Grant#

Build a grant addressed to everyone who fulfils a role.

Parameters#

roleRoleType | str

The role, as the enum member or its value.

enabledbool | None, default=None

The enablement to state, or None to state none.

datadict[str, Any] | None, default=None

The data to state, or None to state none.

Returns#

Grant

The grant, addressed to that role.

Raises#

ValueError

If the role names no known RoleType.