@dhyasama/totem-models 8.45.0 → 8.46.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/Account.js +22 -0
- package/package.json +1 -1
package/lib/Account.js
CHANGED
|
@@ -19,6 +19,14 @@ module.exports = function(mongoose, config) {
|
|
|
19
19
|
// Enable this and iLevel links will show on portfolio pages
|
|
20
20
|
iLevelUser: { type: Boolean },
|
|
21
21
|
|
|
22
|
+
totemLive: {
|
|
23
|
+
|
|
24
|
+
excelUser: { type: Boolean, default: false },
|
|
25
|
+
|
|
26
|
+
sheetsUser: { type: Boolean, default: false },
|
|
27
|
+
|
|
28
|
+
},
|
|
29
|
+
|
|
22
30
|
person: {
|
|
23
31
|
type: Schema.ObjectId,
|
|
24
32
|
ref: 'Person',
|
|
@@ -71,6 +79,20 @@ module.exports = function(mongoose, config) {
|
|
|
71
79
|
|
|
72
80
|
});
|
|
73
81
|
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
Account.virtual('live.excelUser').get(function () {
|
|
85
|
+
const self = this;
|
|
86
|
+
return self.totemLive && self.totemLive.excelUser;
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
Account.virtual('live.sheetsUser').get(function () {
|
|
90
|
+
const self = this;
|
|
91
|
+
return self.totemLive && self.totemLive.sheetsUser;
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
|
|
74
96
|
Account.statics.findByEmail = function(email, cb) {
|
|
75
97
|
|
|
76
98
|
let self = this;
|