Last active
August 29, 2015 14:08
-
-
Save bdunnette/6560de4120332daf4f78 to your computer and use it in GitHub Desktop.
Create necessary roles in Meteor
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
function createDefaultRoles() { | |
defaultRoles = ['admin', 'researcher']; | |
defaultRoles.forEach(function(roleName) { | |
if (!Meteor.roles.findOne({ | |
name: roleName | |
})) { | |
Roles.createRole(roleName); | |
} | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment