Skip to content

role.rk ​

A role an app defines (apps/<app>/roles/<role>.rk). Model permissions name roles; members get roles in an organisation.

Lives in modules/<module>/roles/<role>.rk or apps/<app>/roles/<role>.rk · Schema role.json (source) · first line: # yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/role.json

Properties ​

PropertyTypeMeaning
name requirednamesnake_case, never renamed once released
pattern ^[a-z][a-z0-9_]{0,62}$
label requiredlabelA label in Bahasa Indonesia (required) and optionally English.
label.id requiredstring
label.enstring
descriptionlabelA label in Bahasa Indonesia (required) and optionally English.
description.id requiredstring
description.enstring
inheritslist of nameRoles whose permissions this role also has
deskbooleanMembers with this role use the back office (false: portal only)
scopeobjectRow scope: members with this role see only records whose field holds a value from from (contract 0010)
scope.field requiredname or list of nameA field name or a list of names, e.g. outlet or [from_outlet, to_outlet]
scope.from requiredstringCEL over user returning a list of record names, e.g. user.outlets

Example ​

From rangka-apps/modules/users/roles/sales_rep.rk (first 60 lines):

yaml
# yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/role.json
name: sales_rep
label: {id: Sales}
description: {id: Melihat dan mengubah lead dan peluang miliknya sendiri}

Generated from the schema by website/scripts/gen-reference.mjs. Edit the schema, not this page.

Rangka OS is source-available under the Elastic License 2.0 (ELv2). Free to self-host.