hardened configuration

- moved env rewrite + dotenv code to single location
- fixed bug with system flag on user
This commit is contained in:
Wyatt Johnson
2018-01-05 16:06:36 -07:00
parent 6260339508
commit c07ec23a20
18 changed files with 70 additions and 52 deletions
+8
View File
@@ -295,6 +295,14 @@ UserSchema.virtual('hasVerifiedEmail').get(function() {
});
});
UserSchema.virtual('system')
.get(function() {
return this._system;
})
.set(function(system) {
this._system = system;
});
/**
* banned returns true when the user is currently banned, and sets the banned
* status locally.