@node-red/editor-api.auth

needsPermission(permission) → {function}

Returns an Express middleware function that ensures the user making a request has the necessary permission.

Parameters:
Name Type Description
permission String

the permission required for the request, such as flows.write

Returns:
Type:
function
  • an Express middleware