permission.denied
Signed in, but not allowed to do this
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"
}Choosing between neighbours
Find the row that describes your case, and use the intent on the right.
If it is
Use
Signed in, but not allowed to do this
permission.deniedthis pageHiding that the thing exists at all
record.missingA signed-in caller who may not do this
rather thanauth.requiredpermission.deniedthis page
Connections
Declared in the registry, both directions. Where an intent is used in your own code is something check and the gallery see; this site has no app code.
- Built from
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.' },
},