Copied starter Meteor App files.

Cut and paste of the BasicMeteorApp.
This commit is contained in:
2018-07-30 14:15:39 -07:00
parent b65fc15fb8
commit 94000458e4
89 changed files with 27017 additions and 1 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;