Added ability for ystem admin to disable registration.

This commit is contained in:
Brian McGonagill 2023-06-11 12:30:08 -05:00
parent 45b78101c8
commit bc8df48389
10 changed files with 145 additions and 32 deletions

View file

@ -1,5 +1,7 @@
Template.login.onCreated(function() {
import { SysConfig } from '../../../imports/api/systemConfig.js';
Template.login.onCreated(function() {
this.subscribe("SystemConfig");
});
Template.login.onRendered(function() {
@ -9,6 +11,14 @@ Template.login.onRendered(function() {
Template.login.helpers({
areFilled: function() {
return Session.get("filledFields");
},
canReg: function() {
let conf = SysConfig.findOne();
if (typeof conf != 'undefined') {
return conf.allowReg;
} else {
return true;
}
}
});