Skip to content

Instantly share code, notes, and snippets.

@cygmris
Forked from fnakstad/routingConfig.js
Created August 17, 2017 16:41
Show Gist options
  • Save cygmris/0a17c0d0127ea88cc2e2560aa136d088 to your computer and use it in GitHub Desktop.
Save cygmris/0a17c0d0127ea88cc2e2560aa136d088 to your computer and use it in GitHub Desktop.
(function(exports){
var userRoles = {
public: 1, // 001
user: 2, // 010
admin: 4 // 100
};
exports.userRoles = userRoles;
exports.accessLevels = {
public: userRoles.public | // 111
userRoles.user |
userRoles.admin,
anon: userRoles.public, // 001
user: userRoles.user | // 110
userRoles.admin,
admin: userRoles.admin // 100
};
})(typeof exports === 'undefined'? this['routingConfig']={}: exports);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment