Skip to content

Instantly share code, notes, and snippets.

@fnakstad
Last active August 17, 2017 16:41
Show Gist options
  • Save fnakstad/6031923 to your computer and use it in GitHub Desktop.
Save fnakstad/6031923 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