Last active
January 16, 2019 11:48
-
-
Save gwuah/46d07e4df0a73eb941c4920fc8b77918 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
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