Charter · API

resolveRole

Resolves one role in one section to a set of ids: the ids of the roles it extends, plus the ids its allow matches, minus the ids its deny matches. Throws on a role the charter does not define and on a cycle of extends.

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

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