Feature Access and Plan Restrictions
The most common authorisation scenario you will find yourself building is controlling access to features based on the account's billing plan.
Users without a plan
// check account has a plan
const accountData = await account.get({ id: req.account });
utility.assert(accountData.plan, res.__('account.plan_required'));Restricting features by plan
"plans": [
{
"id": "free",
"name": "Free",
"type": "free",
"price": 0,
"max_gb": 2,
"store_files": true,
}
]Last updated