Initial commit. Modified the Meteor todos app to create the Petit Teton data tracking app. Has working data for sales. Requires a Mongo database.

This commit is contained in:
Wynne Crisman
2017-01-15 11:33:37 -08:00
commit b757595cd6
104 changed files with 26824 additions and 0 deletions

17
imports/api/Roles.js Normal file
View File

@@ -0,0 +1,17 @@
if(Meteor.isServer) {
Meteor.publish('roles', function() {
if(Roles.userIsInRole(this.userId, ['manage'])) {
return Meteor.roles.find({}, {fields: {name: 1}});
}
else throw new Meteor.Error(403, "Not authorized to view roles.");
});
}
let ROLE_MANAGE = "manage";
let ROLE_UPDATE = "update";
Meteor.UserRoles = {ROLE_MANAGE, ROLE_UPDATE};
export default Meteor.roles;