Charter · API
normalizeRole
Returns one role definition as its allow, deny, extends and without lists for one section, with shorthand forms expanded. It is intended for tools that inspect a charter, and verifyCharter uses it. In the example the top-level allow and deny expand into actions, and the data array expands into an allow list.
{
extends: ['usher'],
allow: ['*'],
deny: ['me.*'],
data: ['*.read'],
}{
actions: {
allow: ['*'],
deny: ['me.*'],
extends: ['usher'],
without: [],
},
data: {
allow: ['*.read'],
deny: [],
extends: ['usher'],
without: [],
},
}Runs in this page on the installed package. The input and the expected output are defined by the example.