Skip to content

Instantly share code, notes, and snippets.

@gwuah
Last active January 16, 2019 11:48
Show Gist options
  • Save gwuah/46d07e4df0a73eb941c4920fc8b77918 to your computer and use it in GitHub Desktop.
Save gwuah/46d07e4df0a73eb941c4920fc8b77918 to your computer and use it in GitHub Desktop.
/*
ottisConfig.js will be created later.
but for now lets' assume it contains
our configurations/permissions.
*/
const User = require('./ottisConfig');
const requestObj = {}; // http request object
// this returns either true or false.
User('roleName').canAccess({
resource: 'resource-name',
request: requestObj
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment