mirror of
https://gitlab.com/bmcgonag/get_my.git
synced 2026-03-27 00:08:49 +00:00
My big initial commit to this repo and project.
This commit is contained in:
parent
750811a81f
commit
8636f8cf9b
2433 changed files with 199488 additions and 1042 deletions
|
|
@ -1,5 +1,5 @@
|
|||
Accounts.emailTemplates.from = 'no-reply@parentpickup.org';
|
||||
Accounts.emailTemplates.siteName = 'Parent Pickup';
|
||||
Accounts.emailTemplates.from = 'no-reply@getmy.org';
|
||||
Accounts.emailTemplates.siteName = 'Get Myp';
|
||||
|
||||
Accounts.emailTemplates.verifyEmail = {
|
||||
subject() {
|
||||
|
|
@ -8,8 +8,8 @@ Accounts.emailTemplates.verifyEmail = {
|
|||
text(user, url) {
|
||||
let emailAddress = user.emails[0].address,
|
||||
urlWithoutHash = url.replace('#/', ''),
|
||||
supportEmail = "no-reply@parentpickup.org",
|
||||
emailBody = "Thank you for signing up to use Parent Pickup!\n\n You signed up with " + emailAddress + " . Please confirm your email address.\n\n We will not enroll you in any mailing lists, nor will we ever share you email address or personal information for any reason.\n\n You can confirm you address by clicking the following link: \n\n " + urlWithoutHash
|
||||
supportEmail = "no-reply@getmy .org",
|
||||
emailBody = "Thank you for signing up to use Get My!\n\n You signed up with " + emailAddress + " . Please confirm your email address.\n\n We will not enroll you in any mailing lists, nor will we ever share you email address or personal information for any reason.\n\n You can confirm you address by clicking the following link: \n\n " + urlWithoutHash
|
||||
|
||||
return emailBody;
|
||||
},
|
||||
|
|
|
|||
|
|
@ -2,9 +2,7 @@ import { Meteor } from 'meteor/meteor';
|
|||
|
||||
Meteor.startup(() => {
|
||||
// code to run on server at startup
|
||||
Roles.createRole("parent", {unlessExists: true});
|
||||
Roles.createRole("user", {unlessExists: true});
|
||||
Roles.createRole("admin", {unlessExists: true});
|
||||
Roles.createRole("systemadmin", {unlessExists: true});
|
||||
Roles.createRole("monitor", {unlessExists: true});
|
||||
Roles.createRole("teacher", {unlessExists: true});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -4,8 +4,17 @@ import { check } from 'meteor/check';
|
|||
|
||||
Meteor.methods({
|
||||
'addToRole' (role) {
|
||||
console.log("User id for role: " + Meteor.userId() );
|
||||
let userId = Meteor.userId();
|
||||
Roles.addUsersToRoles(userId, role);
|
||||
let countOfUsers = Meteor.users.find().count();
|
||||
|
||||
// if users = 1 - set to role passed in function call
|
||||
if (countOfUsers > 1) {
|
||||
console.log("User id for role: " + Meteor.userId() );
|
||||
let userId = Meteor.userId();
|
||||
Roles.addUsersToRoles(userId, role);
|
||||
} else if (countOfUsers == 1) {
|
||||
console.log("Creating first system admin user: " + Meteor.userId() );
|
||||
let userId = Meteor.userId();
|
||||
Roles.addUsersToRoles(userId, "systemadmin");
|
||||
}
|
||||
},
|
||||
});
|
||||
|
|
@ -1,5 +1,4 @@
|
|||
import { SysConfig } from '../imports/api/systemConfig.js';
|
||||
import { ServiceEntities } from '../imports/api/serviceentities.js';
|
||||
|
||||
Meteor.publish("SystemConfig", function() {
|
||||
try {
|
||||
|
|
@ -8,11 +7,3 @@ Meteor.publish("SystemConfig", function() {
|
|||
console.log(" ERROR pulling system config data: " + error);
|
||||
}
|
||||
});
|
||||
|
||||
Meteor.publish("ServiceEntities", function() {
|
||||
try {
|
||||
return ServiceEntities.find({});
|
||||
} catch (error) {
|
||||
console.log(" ERROR pulling Service Entity data: " + error);
|
||||
}
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue