Charter · Role syntax

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.

Charter
{
  usher: {
    actions: ['programme', 'door.*'],
    data: ['shows.read', 'bookings.read'],
    functions: ['door.*'],
  },
}
Action ids
[
  'welcome',
  'programme',
  'seats',
  'me.tickets',
  'me.pass',
  'door.list',
  'members',
  'takings',
  'settings',
]
Data ids
[
  'shows.read',
  'bookings.read',
  'bookings.write',
  'passes.read',
  'members.read',
]
Function ids
['door.admit', 'tickets.book', 'tickets.refund']
Resolved ids by section
{
  actions: ['programme', 'door.list'],
  data: ['shows.read', 'bookings.read'],
  functions: ['door.admit'],
}
Output matches the expected value

Runs in this page on the installed package. The input and the expected output are defined by the example.