Charter · Role syntax

extends

extends lists roles whose resolved ids the role inherits, in addition to what it allows itself. Only resolved ids are inherited: a deny on the extended role is not carried over as a deny. In the example usher denies seats, and manager extends usher and allows seats.

Charter
{
  usher: {
    allow: ['programme', 'door.*', 'seats'],
    deny: ['seats'],
  },
  manager: { extends: ['usher'], allow: ['seats', 'takings'] },
}
Action ids
[
  'welcome',
  'programme',
  'seats',
  'me.tickets',
  'me.pass',
  'door.list',
  'members',
  'takings',
  'settings',
]
Resolved ids by role
{
  usher: ['programme', 'door.list'],
  manager: ['programme', 'seats', 'door.list', 'takings'],
}
Output matches the expected value

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