mirror of
https://gitlab.com/bmcgonag/get_my.git
synced 2026-03-26 15:58:50 +00:00
Updated to set system reg policy on first run.
This commit is contained in:
parent
de1ca5bace
commit
84dd13d92d
2 changed files with 14 additions and 1 deletions
|
|
@ -1,5 +1,5 @@
|
|||
Accounts.emailTemplates.from = 'no-reply@getmy.org';
|
||||
Accounts.emailTemplates.siteName = 'Get Myp';
|
||||
Accounts.emailTemplates.siteName = 'Get My';
|
||||
|
||||
Accounts.emailTemplates.verifyEmail = {
|
||||
subject() {
|
||||
|
|
|
|||
|
|
@ -1,8 +1,21 @@
|
|||
import { Meteor } from 'meteor/meteor';
|
||||
import { SysConfig } from '../imports/api/systemConfig';
|
||||
|
||||
Meteor.startup(() => {
|
||||
// code to run on server at startup
|
||||
Roles.createRole("user", {unlessExists: true});
|
||||
Roles.createRole("admin", {unlessExists: true});
|
||||
Roles.createRole("systemadmin", {unlessExists: true});
|
||||
|
||||
// set the systemconfig defaults for registration
|
||||
let regPolicy = SysConfig.findOne({});
|
||||
if (typeof regPolicy == 'undefined') {
|
||||
return SysConfig.insert({
|
||||
SysAdminReg: false,
|
||||
dateAdded: new Date(),
|
||||
allowReg: true,
|
||||
});
|
||||
} else {
|
||||
console.log("Registration policy already set.");
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue