Charter · API
resolvePrincipal
Returns the set of ids granted to a principal in one section: the union of the ids each of its roles resolves to. section defaults to actions. A server calls it when a user signs in; in the example Linus has the roles member and usher.
{
member: ['programme', 'seats', 'me.*'],
usher: ['programme', 'door.*'],
}[ 'welcome', 'programme', 'seats', 'me.tickets', 'me.pass', 'door.list', 'members', 'takings', 'settings', ]
['member', 'usher']
[ 'programme', 'seats', 'me.tickets', 'me.pass', 'door.list', ]
Runs in this page on the installed package. The input and the expected output are defined by the example.