permission.denied
Signed in, but not allowed to do this
Read https://www.prongs.dev/docs/intents/permission/denied.md and tell me whether permission.denied fits what I am building.Example
return fail('permission.denied', 'Only the page owner can do that.');The caller getsTerminal
HTTP 403
{
"ok": false,
"error": "Only the page owner can do that.",
"code": "permission.denied"
}Connections
Choosing between neighbours
If it is
Use
Signed in, but not allowed to do this
permission.deniedHiding that the thing exists at all
record.missingA signed-in caller who may not do this
rather thanauth.requiredpermission.denied
For registry authors
Starter intents. These are the intents prongs add errors puts in your registry, raised with fail(). Change the messages to suit your app, and the statuses through the status.* intents they are built from.
The entry prongs add errors writes into your registry. Change the message here, or the status through its status.* ref.
'permission.denied': {
kind: 'semantic',
description: 'Signed in, but not allowed to do this',
refs: ['status.forbidden'],
keywords: ['forbidden', 'not allowed', 'owner only', 'admin only'],
notFor: [
{
context: 'hiding that the thing exists at all',
instead: 'record.missing',
},
],
binding: { publicMessage: 'You can’t do that.' },
},