@resolveio/server-lib 4.2.8-debug → 4.2.8-newrole
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.
|
@@ -21,13 +21,6 @@ var schema = {
|
|
|
21
21
|
type: Date,
|
|
22
22
|
optional: true
|
|
23
23
|
},
|
|
24
|
-
readonly: {
|
|
25
|
-
type: Boolean,
|
|
26
|
-
optional: true
|
|
27
|
-
},
|
|
28
|
-
active: {
|
|
29
|
-
type: Boolean
|
|
30
|
-
},
|
|
31
24
|
attempts: {
|
|
32
25
|
type: Number,
|
|
33
26
|
optional: true
|
|
@@ -64,53 +57,67 @@ var schema = {
|
|
|
64
57
|
type: String
|
|
65
58
|
},
|
|
66
59
|
roles: {
|
|
60
|
+
type: Object
|
|
61
|
+
},
|
|
62
|
+
'roles.super_admin': {
|
|
63
|
+
type: Boolean
|
|
64
|
+
},
|
|
65
|
+
'roles.approvals': {
|
|
67
66
|
type: Array
|
|
68
67
|
},
|
|
69
|
-
'roles.$': {
|
|
68
|
+
'roles.approvals.$': {
|
|
69
|
+
type: Object
|
|
70
|
+
},
|
|
71
|
+
'roles.approvals.$.name': {
|
|
70
72
|
type: String
|
|
71
73
|
},
|
|
72
|
-
|
|
73
|
-
type: String
|
|
74
|
-
optional: true
|
|
74
|
+
'roles.approvals.$.type': {
|
|
75
|
+
type: String
|
|
75
76
|
},
|
|
76
|
-
|
|
77
|
-
type:
|
|
78
|
-
blackbox: true,
|
|
79
|
-
optional: true
|
|
77
|
+
'roles.approvals.$.accounting_code': {
|
|
78
|
+
type: String
|
|
80
79
|
},
|
|
81
|
-
|
|
82
|
-
type: Array
|
|
83
|
-
optional: true
|
|
80
|
+
'roles.groups': {
|
|
81
|
+
type: Array
|
|
84
82
|
},
|
|
85
|
-
'
|
|
83
|
+
'roles.groups.$': {
|
|
86
84
|
type: Object
|
|
87
85
|
},
|
|
88
|
-
'
|
|
86
|
+
'roles.groups.$.name': {
|
|
89
87
|
type: String
|
|
90
88
|
},
|
|
91
|
-
'
|
|
92
|
-
type:
|
|
89
|
+
'roles.groups.$.views': {
|
|
90
|
+
type: Array
|
|
93
91
|
},
|
|
94
|
-
'
|
|
92
|
+
'roles.groups.$.views.$': {
|
|
95
93
|
type: String
|
|
96
94
|
},
|
|
97
|
-
'
|
|
98
|
-
type: String
|
|
95
|
+
'roles.groups.$.yard': {
|
|
96
|
+
type: String,
|
|
97
|
+
optional: true
|
|
98
|
+
},
|
|
99
|
+
'roles.notifications': {
|
|
100
|
+
type: Array
|
|
99
101
|
},
|
|
100
|
-
'
|
|
102
|
+
'roles.notifications.$': {
|
|
101
103
|
type: String
|
|
102
104
|
},
|
|
103
|
-
'
|
|
104
|
-
type:
|
|
105
|
+
'roles.miscs': {
|
|
106
|
+
type: Array
|
|
105
107
|
},
|
|
106
|
-
'
|
|
107
|
-
type:
|
|
108
|
-
optional: true
|
|
108
|
+
'roles.miscs.$': {
|
|
109
|
+
type: String
|
|
109
110
|
},
|
|
110
|
-
|
|
111
|
+
active: Boolean,
|
|
112
|
+
phonenumber: {
|
|
111
113
|
type: String,
|
|
112
114
|
optional: true
|
|
113
115
|
},
|
|
116
|
+
other: {
|
|
117
|
+
type: Object,
|
|
118
|
+
optional: true,
|
|
119
|
+
blackbox: true
|
|
120
|
+
},
|
|
114
121
|
customers: {
|
|
115
122
|
type: Array,
|
|
116
123
|
optional: true,
|
package/fixtures/init.js
CHANGED
|
@@ -37,8 +37,8 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
37
37
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
38
38
|
var app_version_collection_1 = require("../collections/app-version.collection");
|
|
39
39
|
var logged_in_users_collection_1 = require("../collections/logged-in-users.collection");
|
|
40
|
-
var active_subscription_collection_1 = require("../collections/active-subscription.collection");
|
|
41
40
|
var mongoose_1 = require("mongoose");
|
|
41
|
+
var active_subscription_collection_1 = require("../collections/active-subscription.collection");
|
|
42
42
|
function loadServerInit() {
|
|
43
43
|
return __awaiter(this, void 0, void 0, function () {
|
|
44
44
|
var appVersion;
|
|
@@ -516,7 +516,7 @@ var SubscriptionManager = /** @class */ (function () {
|
|
|
516
516
|
uniquePubs_1 = [];
|
|
517
517
|
uniqueOplog_1 = [];
|
|
518
518
|
needIds_1 = {};
|
|
519
|
-
console.log('----------------OPLOG QUEUE START BEFORE DATA--------------------', new Date(),
|
|
519
|
+
// console.log('----------------OPLOG QUEUE START BEFORE DATA--------------------', new Date(), oplogQueue.length);
|
|
520
520
|
oplogQueue_1.forEach(function (oplog) {
|
|
521
521
|
for (var i = 0; i < that._subscriptions.length; i++) {
|
|
522
522
|
var sub = that._subscriptions[i];
|
|
@@ -541,7 +541,6 @@ var SubscriptionManager = /** @class */ (function () {
|
|
|
541
541
|
}
|
|
542
542
|
}
|
|
543
543
|
});
|
|
544
|
-
console.log('Need IDs:', needIds_1);
|
|
545
544
|
_loop_3 = function (i) {
|
|
546
545
|
var collection, docs;
|
|
547
546
|
return __generator(this, function (_a) {
|
|
@@ -570,11 +569,10 @@ var SubscriptionManager = /** @class */ (function () {
|
|
|
570
569
|
i++;
|
|
571
570
|
return [3 /*break*/, 1];
|
|
572
571
|
case 4:
|
|
573
|
-
console.log('----------------OPLOG QUEUE START AFTER DATA--------------------', new Date(),
|
|
572
|
+
// console.log('----------------OPLOG QUEUE START AFTER DATA--------------------', new Date(), oplogQueue.length);
|
|
574
573
|
oplogQueue_1.forEach(function (oplog) { return __awaiter(_this, void 0, void 0, function () {
|
|
575
574
|
var _loop_4, i;
|
|
576
575
|
return __generator(this, function (_a) {
|
|
577
|
-
console.log('OPLOG QUEUE START - Oplog', oplog);
|
|
578
576
|
_loop_4 = function (i) {
|
|
579
577
|
var _a;
|
|
580
578
|
var sub = that._subscriptions[i];
|
|
@@ -615,15 +613,16 @@ var SubscriptionManager = /** @class */ (function () {
|
|
|
615
613
|
}
|
|
616
614
|
}
|
|
617
615
|
};
|
|
616
|
+
// console.log('OPLOG QUEUE START - Oplog', oplog);
|
|
618
617
|
for (i = 0; i < that._subscriptions.length; i++) {
|
|
619
618
|
_loop_4(i);
|
|
620
619
|
}
|
|
621
620
|
return [2 /*return*/];
|
|
622
621
|
});
|
|
623
622
|
}); });
|
|
624
|
-
console.log('----------------OPLOG QUEUE END--------------------', new Date(),
|
|
623
|
+
// console.log('----------------OPLOG QUEUE END--------------------', new Date(), uniqueOplog.length);
|
|
625
624
|
uniqueOplog_1.forEach(function (oplog) {
|
|
626
|
-
console.log('OPLOG QUEUE END - Oplog', oplog);
|
|
625
|
+
// console.log('OPLOG QUEUE END - Oplog', oplog);
|
|
627
626
|
_this.checkPubsForChanges(oplog.collection, oplog.doc, oplog.type);
|
|
628
627
|
});
|
|
629
628
|
_a.label = 5;
|