Charter · Role syntaxSections (
Sections (actions, data, functions)
A role holds one selection per section: actions selects action ids, data grants on tables such as bookings.read, functions the functions its screens may call, and layouts layout variants. Each section is resolved separately, against its own ids, by the same rules. A role with no functions may call none.
{
usher: {
actions: ['programme', 'door.*'],
data: ['shows.read', 'bookings.read'],
functions: ['door.*'],
},
}[ 'welcome', 'programme', 'seats', 'me.tickets', 'me.pass', 'door.list', 'members', 'takings', 'settings', ]
[ 'shows.read', 'bookings.read', 'bookings.write', 'passes.read', 'members.read', ]
['door.admit', 'tickets.book', 'tickets.refund']
{
actions: ['programme', 'door.list'],
data: ['shows.read', 'bookings.read'],
functions: ['door.admit'],
}Runs in this page on the installed package. The input and the expected output are defined by the example.