Moss · API
server.catalogOf
Answers what a principal holds of the actions in force, as { ids, hash }: the ids of the actions the principal is granted, sorted, and a hash of that list. It is what GET /catalog answers its caller. The principal is resolved the way a request resolves it, and there is no asking by a list of roles. Example: Grace has the role member.
{
guest: {
actions: ['welcome', 'programme'],
data: ['shows.read'],
},
member: {
actions: ['programme', 'seats', 'me.*'],
data: [
'shows.read',
'bookings.*',
'passes.read',
'members.read',
],
scoping: 'personal',
},
usher: {
actions: ['programme', 'door.*'],
data: ['shows.read', 'bookings.read', 'members.read'],
},
manager: {
extends: ['usher'],
actions: { allow: ['*'], deny: ['welcome', 'me.*'] },
data: ['*.read'],
},
}[ 'welcome', 'programme', 'seats', 'me.tickets', 'me.pass', 'door.list', 'members', 'takings', 'settings', ]
['member']
{
ids: ['me.pass', 'me.tickets', 'programme', 'seats'],
hash: 'c46b782d',
}Computed when this site was built, by the installed package, which does not run in a browser. The site’s checks recompute it on every change.