Skip to content

Instantly share code, notes, and snippets.

@francium-lupe
Created January 17, 2024 22:24
Show Gist options
  • Save francium-lupe/1856c950a3db8f331034e57ba0cfcadb to your computer and use it in GitHub Desktop.
Save francium-lupe/1856c950a3db8f331034e57ba0cfcadb to your computer and use it in GitHub Desktop.
(ReBAC) in Node.js 10
const authorized = await oso.authorize(
{ type: 'User', id: 'Peter' },
'edit',
{ type: 'Issue', id: 'tps-reports-99' }
);
console.log(authorized); // true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment