@campxdev/server-shared 1.3.24 → 1.3.25
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/dist/common/databases/mongoose.repository.d.ts +41 -0
- package/dist/common/databases/mongoose.repository.d.ts.map +1 -0
- package/dist/common/databases/mongoose.repository.js +95 -0
- package/dist/common/databases/mongoose.repository.js.map +1 -0
- package/dist/common/filters/unhandled-exception.filter.js +3 -2
- package/dist/common/filters/unhandled-exception.filter.js.map +1 -1
- package/dist/common/guards/guard.d.ts +0 -2
- package/dist/common/guards/guard.d.ts.map +1 -1
- package/dist/common/guards/guard.js +1 -6
- package/dist/common/guards/guard.js.map +1 -1
- package/dist/common/index.d.ts +1 -1
- package/dist/common/index.d.ts.map +1 -1
- package/dist/common/index.js +1 -1
- package/dist/common/index.js.map +1 -1
- package/dist/common/interceptors/request.interceptor.d.ts +1 -6
- package/dist/common/interceptors/request.interceptor.d.ts.map +1 -1
- package/dist/common/interceptors/request.interceptor.js +13 -53
- package/dist/common/interceptors/request.interceptor.js.map +1 -1
- package/dist/common/interfaces/context.interface.d.ts +32 -62
- package/dist/common/interfaces/context.interface.d.ts.map +1 -1
- package/dist/common/store/request-store.d.ts +7 -27
- package/dist/common/store/request-store.d.ts.map +1 -1
- package/dist/common/store/request-store.js +23 -96
- package/dist/common/store/request-store.js.map +1 -1
- package/dist/common/store/store.interceptor.js +3 -2
- package/dist/common/store/store.interceptor.js.map +1 -1
- package/dist/domain/db-connection.module.js +3 -2
- package/dist/domain/db-connection.module.js.map +1 -1
- package/dist/domain/entities/department.entity.d.ts +10 -0
- package/dist/domain/entities/department.entity.d.ts.map +1 -0
- package/dist/domain/entities/department.entity.js +51 -0
- package/dist/domain/entities/department.entity.js.map +1 -0
- package/dist/domain/entities/evaluator.entity.js +16 -2
- package/dist/domain/entities/evaluator.entity.js.map +1 -1
- package/dist/domain/entities/leads.entity.js +26 -2
- package/dist/domain/entities/leads.entity.js.map +1 -1
- package/dist/domain/entities/profile-permission.entity.d.ts +0 -2
- package/dist/domain/entities/profile-permission.entity.d.ts.map +1 -1
- package/dist/domain/entities/profile-permission.entity.js +12 -7
- package/dist/domain/entities/profile-permission.entity.js.map +1 -1
- package/dist/domain/entities/profile.entity.d.ts +1 -17
- package/dist/domain/entities/profile.entity.d.ts.map +1 -1
- package/dist/domain/entities/profile.entity.js +14 -45
- package/dist/domain/entities/profile.entity.js.map +1 -1
- package/dist/domain/entities/program.entity.d.ts +14 -0
- package/dist/domain/entities/program.entity.d.ts.map +1 -0
- package/dist/domain/entities/program.entity.js +71 -0
- package/dist/domain/entities/program.entity.js.map +1 -0
- package/dist/domain/entities/student.entity.d.ts +31 -11
- package/dist/domain/entities/student.entity.d.ts.map +1 -1
- package/dist/domain/entities/student.entity.js +170 -38
- package/dist/domain/entities/student.entity.js.map +1 -1
- package/dist/domain/entities/user.entity.d.ts +3 -0
- package/dist/domain/entities/user.entity.d.ts.map +1 -1
- package/dist/domain/entities/user.entity.js +29 -2
- package/dist/domain/entities/user.entity.js.map +1 -1
- package/dist/domain/index.d.ts +2 -8
- package/dist/domain/index.d.ts.map +1 -1
- package/dist/domain/index.js +2 -8
- package/dist/domain/index.js.map +1 -1
- package/dist/domain/schemas/global-users.schema.d.ts +3 -12
- package/dist/domain/schemas/global-users.schema.d.ts.map +1 -1
- package/dist/domain/schemas/global-users.schema.js +23 -46
- package/dist/domain/schemas/global-users.schema.js.map +1 -1
- package/dist/domain/schemas/tenant.schema.d.ts +35 -89
- package/dist/domain/schemas/tenant.schema.d.ts.map +1 -1
- package/dist/domain/schemas/tenant.schema.js +85 -274
- package/dist/domain/schemas/tenant.schema.js.map +1 -1
- package/dist/domain/shared-domain.module.js +3 -2
- package/dist/domain/shared-domain.module.js.map +1 -1
- package/dist/permissions/check-permission.guard.d.ts +46 -5
- package/dist/permissions/check-permission.guard.d.ts.map +1 -1
- package/dist/permissions/check-permission.guard.js +8 -14
- package/dist/permissions/check-permission.guard.js.map +1 -1
- package/dist/permissions/index.d.ts +0 -7
- package/dist/permissions/index.d.ts.map +1 -1
- package/dist/permissions/index.js +0 -15
- package/dist/permissions/index.js.map +1 -1
- package/dist/permissions/permissions.d.ts +727 -7806
- package/dist/permissions/permissions.d.ts.map +1 -1
- package/dist/permissions/permissions.js +1916 -94
- package/dist/permissions/permissions.js.map +1 -1
- package/dist/shared-module/shared.module.d.ts +0 -1
- package/dist/shared-module/shared.module.d.ts.map +1 -1
- package/dist/shared-module/shared.module.js +3 -2
- package/dist/shared-module/shared.module.js.map +1 -1
- package/dist/shared-module/shared.service.d.ts +2 -11
- package/dist/shared-module/shared.service.d.ts.map +1 -1
- package/dist/shared-module/shared.service.js +20 -73
- package/dist/shared-module/shared.service.js.map +1 -1
- package/dist/utils/constants.d.ts +4 -19
- package/dist/utils/constants.d.ts.map +1 -1
- package/dist/utils/constants.js +5 -15
- package/dist/utils/constants.js.map +1 -1
- package/dist/utils/utils.d.ts +3 -29
- package/dist/utils/utils.d.ts.map +1 -1
- package/dist/utils/utils.js +12 -132
- package/dist/utils/utils.js.map +1 -1
- package/package.json +1 -1
- package/dist/common/decorators/batch-validation.decorator.d.ts +0 -3
- package/dist/common/decorators/batch-validation.decorator.d.ts.map +0 -1
- package/dist/common/decorators/batch-validation.decorator.js +0 -27
- package/dist/common/decorators/batch-validation.decorator.js.map +0 -1
- package/dist/domain/schemas/admission.schema.d.ts +0 -257
- package/dist/domain/schemas/admission.schema.d.ts.map +0 -1
- package/dist/domain/schemas/admission.schema.js +0 -707
- package/dist/domain/schemas/admission.schema.js.map +0 -1
- package/dist/domain/schemas/course.schema.d.ts +0 -54
- package/dist/domain/schemas/course.schema.d.ts.map +0 -1
- package/dist/domain/schemas/course.schema.js +0 -89
- package/dist/domain/schemas/course.schema.js.map +0 -1
- package/dist/domain/schemas/institution.schema.d.ts +0 -53
- package/dist/domain/schemas/institution.schema.d.ts.map +0 -1
- package/dist/domain/schemas/institution.schema.js +0 -94
- package/dist/domain/schemas/institution.schema.js.map +0 -1
- package/dist/domain/schemas/media-record.schema.d.ts +0 -53
- package/dist/domain/schemas/media-record.schema.d.ts.map +0 -1
- package/dist/domain/schemas/media-record.schema.js +0 -86
- package/dist/domain/schemas/media-record.schema.js.map +0 -1
- package/dist/domain/schemas/program.schema.d.ts +0 -49
- package/dist/domain/schemas/program.schema.d.ts.map +0 -1
- package/dist/domain/schemas/program.schema.js +0 -81
- package/dist/domain/schemas/program.schema.js.map +0 -1
- package/dist/domain/schemas/quota.schema.d.ts +0 -47
- package/dist/domain/schemas/quota.schema.d.ts.map +0 -1
- package/dist/domain/schemas/quota.schema.js +0 -64
- package/dist/domain/schemas/quota.schema.js.map +0 -1
- package/dist/domain/schemas/semester.schema.d.ts +0 -50
- package/dist/domain/schemas/semester.schema.d.ts.map +0 -1
- package/dist/domain/schemas/semester.schema.js +0 -84
- package/dist/domain/schemas/semester.schema.js.map +0 -1
- package/dist/domain/schemas/sub-schemas.schema.d.ts +0 -270
- package/dist/domain/schemas/sub-schemas.schema.d.ts.map +0 -1
- package/dist/domain/schemas/sub-schemas.schema.js +0 -904
- package/dist/domain/schemas/sub-schemas.schema.js.map +0 -1
- package/dist/permissions/app-permissions/commute-x-permissions.d.ts +0 -119
- package/dist/permissions/app-permissions/commute-x-permissions.d.ts.map +0 -1
- package/dist/permissions/app-permissions/commute-x-permissions.js +0 -129
- package/dist/permissions/app-permissions/commute-x-permissions.js.map +0 -1
- package/dist/permissions/app-permissions/enroll-x-permissions.d.ts +0 -532
- package/dist/permissions/app-permissions/enroll-x-permissions.d.ts.map +0 -1
- package/dist/permissions/app-permissions/enroll-x-permissions.js +0 -870
- package/dist/permissions/app-permissions/enroll-x-permissions.js.map +0 -1
- package/dist/permissions/app-permissions/exams-permissions.d.ts +0 -912
- package/dist/permissions/app-permissions/exams-permissions.d.ts.map +0 -1
- package/dist/permissions/app-permissions/exams-permissions.js +0 -1702
- package/dist/permissions/app-permissions/exams-permissions.js.map +0 -1
- package/dist/permissions/app-permissions/hostels-permissions.d.ts +0 -452
- package/dist/permissions/app-permissions/hostels-permissions.d.ts.map +0 -1
- package/dist/permissions/app-permissions/hostels-permissions.js +0 -580
- package/dist/permissions/app-permissions/hostels-permissions.js.map +0 -1
- package/dist/permissions/app-permissions/payments-permissions.d.ts +0 -473
- package/dist/permissions/app-permissions/payments-permissions.d.ts.map +0 -1
- package/dist/permissions/app-permissions/payments-permissions.js +0 -794
- package/dist/permissions/app-permissions/payments-permissions.js.map +0 -1
- package/dist/permissions/app-permissions/people-x-permissions.d.ts +0 -434
- package/dist/permissions/app-permissions/people-x-permissions.d.ts.map +0 -1
- package/dist/permissions/app-permissions/people-x-permissions.js +0 -530
- package/dist/permissions/app-permissions/people-x-permissions.js.map +0 -1
- package/dist/permissions/app-permissions/square-permissions.d.ts +0 -1589
- package/dist/permissions/app-permissions/square-permissions.d.ts.map +0 -1
- package/dist/permissions/app-permissions/square-permissions.js +0 -2885
- package/dist/permissions/app-permissions/square-permissions.js.map +0 -1
|
@@ -9,40 +9,16 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.TenantSchema = exports.Tenant = exports.
|
|
12
|
+
exports.TenantSchema = exports.Tenant = exports.TenantCollectionName = exports.TenantEnvironmentSchema = exports.TenantEnvironment = exports.EasyWDMSConfigSchema = exports.EasyWDMSConfig = exports.SMTPConfigSchema = exports.SMTPConfig = void 0;
|
|
13
13
|
const mongoose_1 = require("@nestjs/mongoose");
|
|
14
14
|
const mongoose_2 = require("mongoose");
|
|
15
|
-
let
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
(0, mongoose_1.Prop)({ required: true }),
|
|
23
|
-
__metadata("design:type", Number)
|
|
24
|
-
], EasyWDMSConfig.prototype, "port", void 0);
|
|
25
|
-
__decorate([
|
|
26
|
-
(0, mongoose_1.Prop)({ required: true }),
|
|
27
|
-
__metadata("design:type", String)
|
|
28
|
-
], EasyWDMSConfig.prototype, "username", void 0);
|
|
29
|
-
__decorate([
|
|
30
|
-
(0, mongoose_1.Prop)({ required: true }),
|
|
31
|
-
__metadata("design:type", String)
|
|
32
|
-
], EasyWDMSConfig.prototype, "password", void 0);
|
|
33
|
-
__decorate([
|
|
34
|
-
(0, mongoose_1.Prop)({ required: true }),
|
|
35
|
-
__metadata("design:type", String)
|
|
36
|
-
], EasyWDMSConfig.prototype, "database", void 0);
|
|
37
|
-
__decorate([
|
|
38
|
-
(0, mongoose_1.Prop)({ required: true }),
|
|
39
|
-
__metadata("design:type", String)
|
|
40
|
-
], EasyWDMSConfig.prototype, "baseApiUrl", void 0);
|
|
41
|
-
exports.EasyWDMSConfig = EasyWDMSConfig = __decorate([
|
|
42
|
-
(0, mongoose_1.Schema)()
|
|
43
|
-
], EasyWDMSConfig);
|
|
44
|
-
const EasyWDMSConfigSchema = mongoose_1.SchemaFactory.createForClass(EasyWDMSConfig);
|
|
45
|
-
let SMTPConfig = exports.SMTPConfig = class SMTPConfig extends mongoose_2.Document {
|
|
15
|
+
let SMTPConfig = class SMTPConfig extends mongoose_2.Document {
|
|
16
|
+
host;
|
|
17
|
+
port;
|
|
18
|
+
username;
|
|
19
|
+
password;
|
|
20
|
+
from;
|
|
21
|
+
secure;
|
|
46
22
|
};
|
|
47
23
|
__decorate([
|
|
48
24
|
(0, mongoose_1.Prop)({ required: true }),
|
|
@@ -61,227 +37,86 @@ __decorate([
|
|
|
61
37
|
__metadata("design:type", String)
|
|
62
38
|
], SMTPConfig.prototype, "password", void 0);
|
|
63
39
|
__decorate([
|
|
64
|
-
(0, mongoose_1.Prop)(),
|
|
40
|
+
(0, mongoose_1.Prop)({ required: false }),
|
|
65
41
|
__metadata("design:type", String)
|
|
66
42
|
], SMTPConfig.prototype, "from", void 0);
|
|
67
43
|
__decorate([
|
|
68
|
-
(0, mongoose_1.Prop)({
|
|
44
|
+
(0, mongoose_1.Prop)({ required: true }),
|
|
69
45
|
__metadata("design:type", Boolean)
|
|
70
46
|
], SMTPConfig.prototype, "secure", void 0);
|
|
71
|
-
|
|
47
|
+
SMTPConfig = __decorate([
|
|
72
48
|
(0, mongoose_1.Schema)()
|
|
73
49
|
], SMTPConfig);
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
__metadata("design:type", String)
|
|
84
|
-
], TextLocalConfig.prototype, "apiKey", void 0);
|
|
85
|
-
__decorate([
|
|
86
|
-
(0, mongoose_1.Prop)({ required: true }),
|
|
87
|
-
__metadata("design:type", String)
|
|
88
|
-
], TextLocalConfig.prototype, "sender", void 0);
|
|
89
|
-
exports.TextLocalConfig = TextLocalConfig = __decorate([
|
|
90
|
-
(0, mongoose_1.Schema)()
|
|
91
|
-
], TextLocalConfig);
|
|
92
|
-
const TextLocalConfigSchema = mongoose_1.SchemaFactory.createForClass(TextLocalConfig);
|
|
93
|
-
let RazorpayConfig = exports.RazorpayConfig = class RazorpayConfig extends mongoose_2.Document {
|
|
94
|
-
};
|
|
95
|
-
__decorate([
|
|
96
|
-
(0, mongoose_1.Prop)({ required: true }),
|
|
97
|
-
__metadata("design:type", String)
|
|
98
|
-
], RazorpayConfig.prototype, "key", void 0);
|
|
99
|
-
__decorate([
|
|
100
|
-
(0, mongoose_1.Prop)({ required: true }),
|
|
101
|
-
__metadata("design:type", String)
|
|
102
|
-
], RazorpayConfig.prototype, "secret", void 0);
|
|
103
|
-
exports.RazorpayConfig = RazorpayConfig = __decorate([
|
|
104
|
-
(0, mongoose_1.Schema)()
|
|
105
|
-
], RazorpayConfig);
|
|
106
|
-
const RazorpayConfigSchema = mongoose_1.SchemaFactory.createForClass(RazorpayConfig);
|
|
107
|
-
let PaytmConfig = exports.PaytmConfig = class PaytmConfig extends mongoose_2.Document {
|
|
108
|
-
};
|
|
109
|
-
__decorate([
|
|
110
|
-
(0, mongoose_1.Prop)({ required: true }),
|
|
111
|
-
__metadata("design:type", String)
|
|
112
|
-
], PaytmConfig.prototype, "merchantId", void 0);
|
|
113
|
-
__decorate([
|
|
114
|
-
(0, mongoose_1.Prop)({ required: true }),
|
|
115
|
-
__metadata("design:type", String)
|
|
116
|
-
], PaytmConfig.prototype, "merchantKey", void 0);
|
|
117
|
-
__decorate([
|
|
118
|
-
(0, mongoose_1.Prop)({ required: true }),
|
|
119
|
-
__metadata("design:type", String)
|
|
120
|
-
], PaytmConfig.prototype, "industryType", void 0);
|
|
121
|
-
__decorate([
|
|
122
|
-
(0, mongoose_1.Prop)({ required: true }),
|
|
123
|
-
__metadata("design:type", String)
|
|
124
|
-
], PaytmConfig.prototype, "website", void 0);
|
|
125
|
-
__decorate([
|
|
126
|
-
(0, mongoose_1.Prop)({ default: true }),
|
|
127
|
-
__metadata("design:type", Boolean)
|
|
128
|
-
], PaytmConfig.prototype, "isProd", void 0);
|
|
129
|
-
__decorate([
|
|
130
|
-
(0, mongoose_1.Prop)(),
|
|
131
|
-
__metadata("design:type", String)
|
|
132
|
-
], PaytmConfig.prototype, "channelId", void 0);
|
|
133
|
-
__decorate([
|
|
134
|
-
(0, mongoose_1.Prop)(),
|
|
135
|
-
__metadata("design:type", String)
|
|
136
|
-
], PaytmConfig.prototype, "callbackUrl", void 0);
|
|
137
|
-
__decorate([
|
|
138
|
-
(0, mongoose_1.Prop)(),
|
|
139
|
-
__metadata("design:type", String)
|
|
140
|
-
], PaytmConfig.prototype, "transactionUrl", void 0);
|
|
141
|
-
__decorate([
|
|
142
|
-
(0, mongoose_1.Prop)(),
|
|
143
|
-
__metadata("design:type", String)
|
|
144
|
-
], PaytmConfig.prototype, "accountNumber", void 0);
|
|
145
|
-
__decorate([
|
|
146
|
-
(0, mongoose_1.Prop)(),
|
|
147
|
-
__metadata("design:type", String)
|
|
148
|
-
], PaytmConfig.prototype, "accountName", void 0);
|
|
149
|
-
exports.PaytmConfig = PaytmConfig = __decorate([
|
|
150
|
-
(0, mongoose_1.Schema)()
|
|
151
|
-
], PaytmConfig);
|
|
152
|
-
const PaytmConfigSchema = mongoose_1.SchemaFactory.createForClass(PaytmConfig);
|
|
153
|
-
let AirPayConfig = exports.AirPayConfig = class AirPayConfig extends mongoose_2.Document {
|
|
50
|
+
exports.SMTPConfig = SMTPConfig;
|
|
51
|
+
exports.SMTPConfigSchema = mongoose_1.SchemaFactory.createForClass(SMTPConfig);
|
|
52
|
+
let EasyWDMSConfig = class EasyWDMSConfig extends mongoose_2.Document {
|
|
53
|
+
host;
|
|
54
|
+
port;
|
|
55
|
+
username;
|
|
56
|
+
password;
|
|
57
|
+
database;
|
|
58
|
+
baseApiUrl;
|
|
154
59
|
};
|
|
155
60
|
__decorate([
|
|
156
61
|
(0, mongoose_1.Prop)({ required: true }),
|
|
157
62
|
__metadata("design:type", String)
|
|
158
|
-
],
|
|
159
|
-
__decorate([
|
|
160
|
-
(0, mongoose_1.Prop)({ required: true }),
|
|
161
|
-
__metadata("design:type", String)
|
|
162
|
-
], AirPayConfig.prototype, "username", void 0);
|
|
63
|
+
], EasyWDMSConfig.prototype, "host", void 0);
|
|
163
64
|
__decorate([
|
|
164
65
|
(0, mongoose_1.Prop)({ required: true }),
|
|
165
|
-
__metadata("design:type",
|
|
166
|
-
],
|
|
66
|
+
__metadata("design:type", Number)
|
|
67
|
+
], EasyWDMSConfig.prototype, "port", void 0);
|
|
167
68
|
__decorate([
|
|
168
69
|
(0, mongoose_1.Prop)({ required: true }),
|
|
169
70
|
__metadata("design:type", String)
|
|
170
|
-
],
|
|
171
|
-
exports.AirPayConfig = AirPayConfig = __decorate([
|
|
172
|
-
(0, mongoose_1.Schema)()
|
|
173
|
-
], AirPayConfig);
|
|
174
|
-
const AirPayConfigSchema = mongoose_1.SchemaFactory.createForClass(AirPayConfig);
|
|
175
|
-
let BillDeskConfig = exports.BillDeskConfig = class BillDeskConfig extends mongoose_2.Document {
|
|
176
|
-
};
|
|
71
|
+
], EasyWDMSConfig.prototype, "username", void 0);
|
|
177
72
|
__decorate([
|
|
178
73
|
(0, mongoose_1.Prop)({ required: true }),
|
|
179
74
|
__metadata("design:type", String)
|
|
180
|
-
],
|
|
75
|
+
], EasyWDMSConfig.prototype, "password", void 0);
|
|
181
76
|
__decorate([
|
|
182
77
|
(0, mongoose_1.Prop)({ required: true }),
|
|
183
78
|
__metadata("design:type", String)
|
|
184
|
-
],
|
|
79
|
+
], EasyWDMSConfig.prototype, "database", void 0);
|
|
185
80
|
__decorate([
|
|
186
81
|
(0, mongoose_1.Prop)({ required: true }),
|
|
187
82
|
__metadata("design:type", String)
|
|
188
|
-
],
|
|
189
|
-
|
|
83
|
+
], EasyWDMSConfig.prototype, "baseApiUrl", void 0);
|
|
84
|
+
EasyWDMSConfig = __decorate([
|
|
190
85
|
(0, mongoose_1.Schema)()
|
|
191
|
-
],
|
|
192
|
-
|
|
193
|
-
|
|
86
|
+
], EasyWDMSConfig);
|
|
87
|
+
exports.EasyWDMSConfig = EasyWDMSConfig;
|
|
88
|
+
exports.EasyWDMSConfigSchema = mongoose_1.SchemaFactory.createForClass(EasyWDMSConfig);
|
|
89
|
+
let TenantEnvironment = class TenantEnvironment extends mongoose_2.Document {
|
|
90
|
+
s3AccessKeyId;
|
|
91
|
+
s3SecretAccessKey;
|
|
92
|
+
s3BucketName;
|
|
93
|
+
s3Region;
|
|
94
|
+
s3Endpoint;
|
|
95
|
+
sentryDsn;
|
|
96
|
+
razorpayKey;
|
|
97
|
+
razorpaySecret;
|
|
98
|
+
clientName;
|
|
194
99
|
};
|
|
195
100
|
__decorate([
|
|
196
101
|
(0, mongoose_1.Prop)({ required: true }),
|
|
197
102
|
__metadata("design:type", String)
|
|
198
|
-
],
|
|
103
|
+
], TenantEnvironment.prototype, "s3AccessKeyId", void 0);
|
|
199
104
|
__decorate([
|
|
200
105
|
(0, mongoose_1.Prop)({ required: true }),
|
|
201
106
|
__metadata("design:type", String)
|
|
202
|
-
],
|
|
107
|
+
], TenantEnvironment.prototype, "s3SecretAccessKey", void 0);
|
|
203
108
|
__decorate([
|
|
204
109
|
(0, mongoose_1.Prop)({ required: true }),
|
|
205
110
|
__metadata("design:type", String)
|
|
206
|
-
],
|
|
207
|
-
exports.BillDeskV2Config = BillDeskV2Config = __decorate([
|
|
208
|
-
(0, mongoose_1.Schema)()
|
|
209
|
-
], BillDeskV2Config);
|
|
210
|
-
const BillDeskV2ConfigSchema = mongoose_1.SchemaFactory.createForClass(BillDeskConfig);
|
|
211
|
-
let GrayQuestConfig = exports.GrayQuestConfig = class GrayQuestConfig extends mongoose_2.Document {
|
|
212
|
-
};
|
|
213
|
-
__decorate([
|
|
214
|
-
(0, mongoose_1.Prop)({ required: true }),
|
|
215
|
-
__metadata("design:type", String)
|
|
216
|
-
], GrayQuestConfig.prototype, "clientId", void 0);
|
|
217
|
-
__decorate([
|
|
218
|
-
(0, mongoose_1.Prop)({ required: true }),
|
|
219
|
-
__metadata("design:type", String)
|
|
220
|
-
], GrayQuestConfig.prototype, "clientSecret", void 0);
|
|
111
|
+
], TenantEnvironment.prototype, "s3BucketName", void 0);
|
|
221
112
|
__decorate([
|
|
222
113
|
(0, mongoose_1.Prop)({ required: true }),
|
|
223
114
|
__metadata("design:type", String)
|
|
224
|
-
],
|
|
115
|
+
], TenantEnvironment.prototype, "s3Region", void 0);
|
|
225
116
|
__decorate([
|
|
226
117
|
(0, mongoose_1.Prop)({ required: true }),
|
|
227
118
|
__metadata("design:type", String)
|
|
228
|
-
],
|
|
229
|
-
exports.GrayQuestConfig = GrayQuestConfig = __decorate([
|
|
230
|
-
(0, mongoose_1.Schema)()
|
|
231
|
-
], GrayQuestConfig);
|
|
232
|
-
const GrayQuestConfigSchema = mongoose_1.SchemaFactory.createForClass(GrayQuestConfig);
|
|
233
|
-
exports.PaymentCredentialsTypes = {
|
|
234
|
-
RAZORPAY: 'RAZORPAY',
|
|
235
|
-
PAYTM: 'PAYTM',
|
|
236
|
-
AIRPAY: 'AIRPAY',
|
|
237
|
-
BILL_DESK: 'BILL_DESK',
|
|
238
|
-
BILL_DESK_V2: 'BILL_DESK_V2',
|
|
239
|
-
GRAY_QUEST: 'GRAY_QUEST',
|
|
240
|
-
};
|
|
241
|
-
let PaymentCredentials = exports.PaymentCredentials = class PaymentCredentials extends mongoose_2.Document {
|
|
242
|
-
};
|
|
243
|
-
__decorate([
|
|
244
|
-
(0, mongoose_1.Prop)({ required: true, key: true }),
|
|
245
|
-
__metadata("design:type", String)
|
|
246
|
-
], PaymentCredentials.prototype, "type", void 0);
|
|
247
|
-
__decorate([
|
|
248
|
-
(0, mongoose_1.Prop)(),
|
|
249
|
-
__metadata("design:type", String)
|
|
250
|
-
], PaymentCredentials.prototype, "paymentFeeChargesId", void 0);
|
|
251
|
-
__decorate([
|
|
252
|
-
(0, mongoose_1.Prop)({ type: RazorpayConfigSchema }),
|
|
253
|
-
__metadata("design:type", RazorpayConfig)
|
|
254
|
-
], PaymentCredentials.prototype, "razorpayConfig", void 0);
|
|
255
|
-
__decorate([
|
|
256
|
-
(0, mongoose_1.Prop)({ type: PaytmConfigSchema }),
|
|
257
|
-
__metadata("design:type", PaytmConfig)
|
|
258
|
-
], PaymentCredentials.prototype, "paytmConfig", void 0);
|
|
259
|
-
__decorate([
|
|
260
|
-
(0, mongoose_1.Prop)({ type: AirPayConfigSchema }),
|
|
261
|
-
__metadata("design:type", AirPayConfig)
|
|
262
|
-
], PaymentCredentials.prototype, "airPayConfig", void 0);
|
|
263
|
-
__decorate([
|
|
264
|
-
(0, mongoose_1.Prop)({ type: BillDeskConfigSchema }),
|
|
265
|
-
__metadata("design:type", BillDeskConfig)
|
|
266
|
-
], PaymentCredentials.prototype, "billDeskConfig", void 0);
|
|
267
|
-
__decorate([
|
|
268
|
-
(0, mongoose_1.Prop)({ type: BillDeskV2ConfigSchema }),
|
|
269
|
-
__metadata("design:type", BillDeskV2Config)
|
|
270
|
-
], PaymentCredentials.prototype, "billDeskV2Config", void 0);
|
|
271
|
-
__decorate([
|
|
272
|
-
(0, mongoose_1.Prop)({ type: GrayQuestConfigSchema }),
|
|
273
|
-
__metadata("design:type", GrayQuestConfig)
|
|
274
|
-
], PaymentCredentials.prototype, "grayQuestConfig", void 0);
|
|
275
|
-
exports.PaymentCredentials = PaymentCredentials = __decorate([
|
|
276
|
-
(0, mongoose_1.Schema)()
|
|
277
|
-
], PaymentCredentials);
|
|
278
|
-
const PaymentCredentialsSchema = mongoose_1.SchemaFactory.createForClass(PaymentCredentials);
|
|
279
|
-
let TenantEnvironment = exports.TenantEnvironment = class TenantEnvironment extends mongoose_2.Document {
|
|
280
|
-
};
|
|
281
|
-
__decorate([
|
|
282
|
-
(0, mongoose_1.Prop)(),
|
|
283
|
-
__metadata("design:type", String)
|
|
284
|
-
], TenantEnvironment.prototype, "s3BucketName", void 0);
|
|
119
|
+
], TenantEnvironment.prototype, "s3Endpoint", void 0);
|
|
285
120
|
__decorate([
|
|
286
121
|
(0, mongoose_1.Prop)(),
|
|
287
122
|
__metadata("design:type", String)
|
|
@@ -289,41 +124,32 @@ __decorate([
|
|
|
289
124
|
__decorate([
|
|
290
125
|
(0, mongoose_1.Prop)(),
|
|
291
126
|
__metadata("design:type", String)
|
|
292
|
-
], TenantEnvironment.prototype, "
|
|
293
|
-
__decorate([
|
|
294
|
-
(0, mongoose_1.Prop)(),
|
|
295
|
-
__metadata("design:type", String)
|
|
296
|
-
], TenantEnvironment.prototype, "studentAndroidApp", void 0);
|
|
297
|
-
__decorate([
|
|
298
|
-
(0, mongoose_1.Prop)(),
|
|
299
|
-
__metadata("design:type", String)
|
|
300
|
-
], TenantEnvironment.prototype, "studentIOSApp", void 0);
|
|
301
|
-
__decorate([
|
|
302
|
-
(0, mongoose_1.Prop)(),
|
|
303
|
-
__metadata("design:type", String)
|
|
304
|
-
], TenantEnvironment.prototype, "facultyAndroidApp", void 0);
|
|
305
|
-
__decorate([
|
|
306
|
-
(0, mongoose_1.Prop)(),
|
|
307
|
-
__metadata("design:type", String)
|
|
308
|
-
], TenantEnvironment.prototype, "facultyIOSApp", void 0);
|
|
127
|
+
], TenantEnvironment.prototype, "razorpayKey", void 0);
|
|
309
128
|
__decorate([
|
|
310
129
|
(0, mongoose_1.Prop)(),
|
|
311
130
|
__metadata("design:type", String)
|
|
312
|
-
], TenantEnvironment.prototype, "
|
|
131
|
+
], TenantEnvironment.prototype, "razorpaySecret", void 0);
|
|
313
132
|
__decorate([
|
|
314
133
|
(0, mongoose_1.Prop)(),
|
|
315
134
|
__metadata("design:type", String)
|
|
316
|
-
], TenantEnvironment.prototype, "
|
|
317
|
-
|
|
135
|
+
], TenantEnvironment.prototype, "clientName", void 0);
|
|
136
|
+
TenantEnvironment = __decorate([
|
|
318
137
|
(0, mongoose_1.Schema)()
|
|
319
138
|
], TenantEnvironment);
|
|
320
|
-
|
|
321
|
-
exports.
|
|
322
|
-
exports.
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
139
|
+
exports.TenantEnvironment = TenantEnvironment;
|
|
140
|
+
exports.TenantEnvironmentSchema = mongoose_1.SchemaFactory.createForClass(TenantEnvironment);
|
|
141
|
+
exports.TenantCollectionName = 'tenants';
|
|
142
|
+
let Tenant = class Tenant extends mongoose_2.Document {
|
|
143
|
+
name;
|
|
144
|
+
subDomain;
|
|
145
|
+
host;
|
|
146
|
+
port;
|
|
147
|
+
username;
|
|
148
|
+
password;
|
|
149
|
+
database;
|
|
150
|
+
env;
|
|
151
|
+
easyWDMSConfig;
|
|
152
|
+
smtpConfig;
|
|
327
153
|
};
|
|
328
154
|
__decorate([
|
|
329
155
|
(0, mongoose_1.Prop)({ required: true, unique: true }),
|
|
@@ -336,53 +162,38 @@ __decorate([
|
|
|
336
162
|
__decorate([
|
|
337
163
|
(0, mongoose_1.Prop)({ required: true }),
|
|
338
164
|
__metadata("design:type", String)
|
|
339
|
-
], Tenant.prototype, "
|
|
165
|
+
], Tenant.prototype, "host", void 0);
|
|
166
|
+
__decorate([
|
|
167
|
+
(0, mongoose_1.Prop)({ required: true }),
|
|
168
|
+
__metadata("design:type", Number)
|
|
169
|
+
], Tenant.prototype, "port", void 0);
|
|
170
|
+
__decorate([
|
|
171
|
+
(0, mongoose_1.Prop)({ required: true }),
|
|
172
|
+
__metadata("design:type", String)
|
|
173
|
+
], Tenant.prototype, "username", void 0);
|
|
174
|
+
__decorate([
|
|
175
|
+
(0, mongoose_1.Prop)({ required: true }),
|
|
176
|
+
__metadata("design:type", String)
|
|
177
|
+
], Tenant.prototype, "password", void 0);
|
|
340
178
|
__decorate([
|
|
341
|
-
(0, mongoose_1.Prop)({
|
|
179
|
+
(0, mongoose_1.Prop)({ required: true }),
|
|
342
180
|
__metadata("design:type", String)
|
|
343
|
-
], Tenant.prototype, "
|
|
181
|
+
], Tenant.prototype, "database", void 0);
|
|
344
182
|
__decorate([
|
|
345
|
-
(0, mongoose_1.Prop)({ required: true, type: TenantEnvironmentSchema }),
|
|
183
|
+
(0, mongoose_1.Prop)({ required: true, type: exports.TenantEnvironmentSchema }),
|
|
346
184
|
__metadata("design:type", TenantEnvironment)
|
|
347
185
|
], Tenant.prototype, "env", void 0);
|
|
348
186
|
__decorate([
|
|
349
|
-
(0, mongoose_1.Prop)({ type: EasyWDMSConfigSchema }),
|
|
187
|
+
(0, mongoose_1.Prop)({ type: exports.EasyWDMSConfigSchema }),
|
|
350
188
|
__metadata("design:type", EasyWDMSConfig)
|
|
351
189
|
], Tenant.prototype, "easyWDMSConfig", void 0);
|
|
352
190
|
__decorate([
|
|
353
|
-
(0, mongoose_1.Prop)({ type: SMTPConfigSchema }),
|
|
191
|
+
(0, mongoose_1.Prop)({ type: exports.SMTPConfigSchema }),
|
|
354
192
|
__metadata("design:type", SMTPConfig)
|
|
355
193
|
], Tenant.prototype, "smtpConfig", void 0);
|
|
356
|
-
__decorate([
|
|
357
|
-
(0, mongoose_1.
|
|
358
|
-
__metadata("design:type", TextLocalConfig)
|
|
359
|
-
], Tenant.prototype, "textLocalConfig", void 0);
|
|
360
|
-
__decorate([
|
|
361
|
-
(0, mongoose_1.Prop)({ type: [PaymentCredentialsSchema], default: [] }),
|
|
362
|
-
__metadata("design:type", Array)
|
|
363
|
-
], Tenant.prototype, "paymentCredentials", void 0);
|
|
364
|
-
__decorate([
|
|
365
|
-
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId }),
|
|
366
|
-
__metadata("design:type", String)
|
|
367
|
-
], Tenant.prototype, "defaultPaymentCredentials", void 0);
|
|
368
|
-
__decorate([
|
|
369
|
-
(0, mongoose_1.Prop)({ default: false }),
|
|
370
|
-
__metadata("design:type", Boolean)
|
|
371
|
-
], Tenant.prototype, "hasInActivityCheck", void 0);
|
|
372
|
-
__decorate([
|
|
373
|
-
(0, mongoose_1.Prop)(),
|
|
374
|
-
__metadata("design:type", Number)
|
|
375
|
-
], Tenant.prototype, "inActivityCheckTime", void 0);
|
|
376
|
-
__decorate([
|
|
377
|
-
(0, mongoose_1.Prop)(),
|
|
378
|
-
__metadata("design:type", String)
|
|
379
|
-
], Tenant.prototype, "masterInstitutionId", void 0);
|
|
380
|
-
__decorate([
|
|
381
|
-
(0, mongoose_1.Prop)(),
|
|
382
|
-
__metadata("design:type", Number)
|
|
383
|
-
], Tenant.prototype, "masterInstitutionUniqueId", void 0);
|
|
384
|
-
exports.Tenant = Tenant = __decorate([
|
|
385
|
-
(0, mongoose_1.Schema)({ collection: exports.TenantCName, timestamps: true, id: true })
|
|
194
|
+
Tenant = __decorate([
|
|
195
|
+
(0, mongoose_1.Schema)({ collection: exports.TenantCollectionName, timestamps: true, id: true })
|
|
386
196
|
], Tenant);
|
|
197
|
+
exports.Tenant = Tenant;
|
|
387
198
|
exports.TenantSchema = mongoose_1.SchemaFactory.createForClass(Tenant);
|
|
388
199
|
//# sourceMappingURL=tenant.schema.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tenant.schema.js","sourceRoot":"","sources":["../../../src/domain/schemas/tenant.schema.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+CAA+D;AAC/D,
|
|
1
|
+
{"version":3,"file":"tenant.schema.js","sourceRoot":"","sources":["../../../src/domain/schemas/tenant.schema.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+CAA+D;AAC/D,uCAAoC;AAG7B,IAAM,UAAU,GAAhB,MAAM,UAAW,SAAQ,mBAAQ;IAEtC,IAAI,CAAS;IAGb,IAAI,CAAS;IAGb,QAAQ,CAAS;IAGjB,QAAQ,CAAS;IAGjB,IAAI,CAAS;IAGb,MAAM,CAAW;CAClB,CAAA;AAjBC;IAAC,IAAA,eAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;wCACZ;AAEb;IAAC,IAAA,eAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;wCACZ;AAEb;IAAC,IAAA,eAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4CACR;AAEjB;IAAC,IAAA,eAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4CACR;AAEjB;IAAC,IAAA,eAAI,EAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;;wCACb;AAEb;IAAC,IAAA,eAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;0CACR;AAjBN,UAAU;IADtB,IAAA,iBAAM,GAAE;GACI,UAAU,CAkBtB;AAlBY,gCAAU;AAoBV,QAAA,gBAAgB,GAAG,wBAAa,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC;AAGlE,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,mBAAQ;IAE1C,IAAI,CAAS;IAGb,IAAI,CAAS;IAGb,QAAQ,CAAS;IAGjB,QAAQ,CAAS;IAGjB,QAAQ,CAAS;IAGjB,UAAU,CAAS;CACpB,CAAA;AAjBC;IAAC,IAAA,eAA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+BAAuB,EAAE,CAAC;8BACnD,iBAAiB;mCAAC;AAEvB;IAAC,IAAA,eAAI,EAAC,EAAE,IAAI,EAAE,4BAAoB,EAAE,CAAC;8BACrB,cAAc;8CAAC;AAE/B;IAAC,IAAA,eAAI,EAAC,EAAE,IAAI,EAAE,wBAAgB,EAAE,CAAC;8BACrB,UAAU;0CAAC;AA7BZ,MAAM;IADlB,IAAA,iBAAM,EAAC,EAAE,UAAU,EAAE,4BAAoB,EAAE,UAAU,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,CAAC;GAC5D,MAAM,CA8BlB;AA9BY,wBAAM;AAgCN,QAAA,YAAY,GAAG,wBAAa,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC"}
|
|
@@ -11,9 +11,9 @@ const common_1 = require("@nestjs/common");
|
|
|
11
11
|
const mongoose_1 = require("@nestjs/mongoose");
|
|
12
12
|
const tenant_schema_1 = require("./schemas/tenant.schema");
|
|
13
13
|
const global_users_schema_1 = require("./schemas/global-users.schema");
|
|
14
|
-
let SharedDomainModule =
|
|
14
|
+
let SharedDomainModule = class SharedDomainModule {
|
|
15
15
|
};
|
|
16
|
-
|
|
16
|
+
SharedDomainModule = __decorate([
|
|
17
17
|
(0, common_1.Module)({
|
|
18
18
|
imports: [
|
|
19
19
|
mongoose_1.MongooseModule.forFeature([
|
|
@@ -24,4 +24,5 @@ exports.SharedDomainModule = SharedDomainModule = __decorate([
|
|
|
24
24
|
exports: [mongoose_1.MongooseModule],
|
|
25
25
|
})
|
|
26
26
|
], SharedDomainModule);
|
|
27
|
+
exports.SharedDomainModule = SharedDomainModule;
|
|
27
28
|
//# sourceMappingURL=shared-domain.module.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared-domain.module.js","sourceRoot":"","sources":["../../src/domain/shared-domain.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,+CAAkD;AAClD,2DAA+D;AAC/D,uEAA6E;AAWtE,IAAM,kBAAkB,
|
|
1
|
+
{"version":3,"file":"shared-domain.module.js","sourceRoot":"","sources":["../../src/domain/shared-domain.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,+CAAkD;AAClD,2DAA+D;AAC/D,uEAA6E;AAWtE,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;CAAG,CAAA;AAArB,kBAAkB;IAT9B,IAAA,eAAM,EAAC;QACN,OAAO,EAAE;YACP,yBAAc,CAAC,UAAU,CAAC;gBACxB,EAAE,IAAI,EAAE,sBAAM,CAAC,IAAI,EAAE,MAAM,EAAE,4BAAY,EAAE;gBAC3C,EAAE,IAAI,EAAE,gCAAU,CAAC,IAAI,EAAE,MAAM,EAAE,sCAAgB,EAAE;aACpD,CAAC;SACH;QACD,OAAO,EAAE,CAAC,yBAAc,CAAC;KAC1B,CAAC;GACW,kBAAkB,CAAG;AAArB,gDAAkB"}
|
|
@@ -1,10 +1,51 @@
|
|
|
1
|
-
import { Model } from 'mongoose';
|
|
2
1
|
import { EntityManager } from 'typeorm';
|
|
3
2
|
import { IRequest } from '../common';
|
|
4
|
-
import {
|
|
5
|
-
export type CheckFn = (manager: EntityManager, user: User, permission: ProfilePermission, req: IRequest
|
|
3
|
+
import { ProfilePermission, User } from '../domain';
|
|
4
|
+
export type CheckFn = (manager: EntityManager, user: User, permission: ProfilePermission, req: IRequest) => Promise<boolean> | boolean;
|
|
6
5
|
export type CheckPermissions = {
|
|
7
|
-
|
|
6
|
+
organisation?: CheckFn | boolean;
|
|
7
|
+
users?: CheckFn | boolean;
|
|
8
|
+
admissions?: CheckFn | boolean;
|
|
9
|
+
students?: CheckFn | boolean;
|
|
10
|
+
subjects?: CheckFn | boolean;
|
|
11
|
+
course_registration?: CheckFn | boolean;
|
|
12
|
+
end_semester_examinations?: CheckFn | boolean;
|
|
13
|
+
internal_examinations?: CheckFn | boolean;
|
|
14
|
+
extra_curricular_activities?: CheckFn | boolean;
|
|
15
|
+
bundling?: CheckFn | boolean;
|
|
16
|
+
classroom?: CheckFn | boolean;
|
|
17
|
+
feed?: CheckFn | boolean;
|
|
18
|
+
programs?: CheckFn | boolean;
|
|
19
|
+
degrees?: CheckFn | boolean;
|
|
20
|
+
semesters?: CheckFn | boolean;
|
|
21
|
+
curriculums?: CheckFn | boolean;
|
|
22
|
+
assessment_rules?: CheckFn | boolean;
|
|
23
|
+
examinations?: CheckFn | boolean;
|
|
24
|
+
results_processing?: CheckFn | boolean;
|
|
25
|
+
lead_status?: CheckFn | boolean;
|
|
26
|
+
hosteler?: CheckFn | boolean;
|
|
27
|
+
hosteler_settings?: CheckFn | boolean;
|
|
28
|
+
schools?: CheckFn | boolean;
|
|
29
|
+
subject_types?: CheckFn | boolean;
|
|
30
|
+
assessment_types?: CheckFn | boolean;
|
|
31
|
+
master_subject?: CheckFn | boolean;
|
|
32
|
+
academic_calendar?: CheckFn | boolean;
|
|
33
|
+
designations?: CheckFn | boolean;
|
|
34
|
+
tasks?: CheckFn | boolean;
|
|
35
|
+
fee_counters?: CheckFn | boolean;
|
|
36
|
+
evaluators?: CheckFn | boolean;
|
|
37
|
+
exam_registrations?: CheckFn | boolean;
|
|
38
|
+
hall_tickets?: CheckFn | boolean;
|
|
39
|
+
omrs?: CheckFn | boolean;
|
|
40
|
+
paper_configuration?: CheckFn | boolean;
|
|
41
|
+
internal_marks?: CheckFn | boolean;
|
|
42
|
+
external_marks?: CheckFn | boolean;
|
|
43
|
+
d_forms?: CheckFn | boolean;
|
|
44
|
+
exam_rooms?: CheckFn | boolean;
|
|
45
|
+
exam_timetable?: CheckFn | boolean;
|
|
46
|
+
time_slots?: CheckFn | boolean;
|
|
47
|
+
quotas?: CheckFn | boolean;
|
|
48
|
+
grades?: CheckFn | boolean;
|
|
8
49
|
};
|
|
9
|
-
export declare function validateRequestPermission(permissionName: string, fns: CheckPermissions
|
|
50
|
+
export declare function validateRequestPermission(permissionName: string, fns: CheckPermissions): Promise<boolean>;
|
|
10
51
|
//# sourceMappingURL=check-permission.guard.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"check-permission.guard.d.ts","sourceRoot":"","sources":["../../src/permissions/check-permission.guard.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"check-permission.guard.d.ts","sourceRoot":"","sources":["../../src/permissions/check-permission.guard.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,EAA0C,QAAQ,EAAE,MAAM,WAAW,CAAC;AAC7E,OAAO,EAAE,iBAAiB,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAGpD,MAAM,MAAM,OAAO,GAAG,CACpB,OAAO,EAAE,aAAa,EACtB,IAAI,EAAE,IAAI,EACV,UAAU,EAAE,iBAAiB,EAC7B,GAAG,EAAE,QAAQ,KACV,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC;AAEhC,MAAM,MAAM,gBAAgB,GAAG;IAC7B,YAAY,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC;IACjC,KAAK,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC;IAC1B,UAAU,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC;IAC/B,QAAQ,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC;IAC7B,QAAQ,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC;IAC7B,mBAAmB,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC;IACxC,yBAAyB,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC;IAC9C,qBAAqB,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC;IAC1C,2BAA2B,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC;IAChD,QAAQ,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC;IAC7B,SAAS,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC;IAC9B,IAAI,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC;IACzB,QAAQ,CAAC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AAE,OAAO,GAAG,OAAO,CAAC;IAC5B,UAAU,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC;IAC/B,cAAc,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC;IACnC,UAAU,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC;IAC/B,MAAM,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC;IAC3B,MAAM,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC;CAC5B,CAAC;AAEF,wBAAsB,yBAAyB,CAC7C,cAAc,EAAE,MAAM,EACtB,GAAG,EAAE,gBAAgB,GACpB,OAAO,CAAC,OAAO,CAAC,CA6ClB"}
|
|
@@ -5,24 +5,20 @@ const lodash_1 = require("lodash");
|
|
|
5
5
|
const common_1 = require("../common");
|
|
6
6
|
const domain_1 = require("../domain");
|
|
7
7
|
const permissions_1 = require("./permissions");
|
|
8
|
-
async function validateRequestPermission(permissionName, fns
|
|
8
|
+
async function validateRequestPermission(permissionName, fns) {
|
|
9
9
|
const reqUser = (0, common_1.getUserData)();
|
|
10
10
|
if (!reqUser || !reqUser.id)
|
|
11
11
|
return false;
|
|
12
12
|
const req = (0, common_1.getRequest)();
|
|
13
|
-
const permission = (0, permissions_1.permissionGroupedBySlug)()[permissionName];
|
|
14
|
-
if (!permission)
|
|
15
|
-
return false;
|
|
16
13
|
const user = await (0, common_1.getDataSource)().manager.findOne(domain_1.User, {
|
|
17
14
|
where: { id: reqUser.id },
|
|
18
|
-
relations:
|
|
15
|
+
relations: ['department', 'department.programs', 'profiles'],
|
|
19
16
|
});
|
|
20
|
-
if (
|
|
21
|
-
return false;
|
|
22
|
-
if (user.isSuperuser ||
|
|
23
|
-
user.profiles.some((p) => p.application === permission.application && p.isAdmin)) {
|
|
17
|
+
if (user.isSuperuser)
|
|
24
18
|
return true;
|
|
25
|
-
|
|
19
|
+
const permission = (0, permissions_1.permissionGroupedBySlug)()[permissionName];
|
|
20
|
+
if (!permission)
|
|
21
|
+
return false;
|
|
26
22
|
const profilePermission = await (0, common_1.getDataSource)()
|
|
27
23
|
.manager.createQueryBuilder(domain_1.ProfilePermission, 'pp')
|
|
28
24
|
.andWhere('pp.permissionSlug = :name', { name: permissionName })
|
|
@@ -49,10 +45,8 @@ async function validateRequestPermission(permissionName, fns, globalUserModel) {
|
|
|
49
45
|
const pp = fns?.[permission.groupSlug];
|
|
50
46
|
if (pp === null || pp === undefined)
|
|
51
47
|
return true;
|
|
52
|
-
if (typeof pp === 'function')
|
|
53
|
-
|
|
54
|
-
return pp((0, common_1.getDataSource)().manager, user, profilePermission, req, globalUser);
|
|
55
|
-
}
|
|
48
|
+
if (typeof pp === 'function')
|
|
49
|
+
return pp((0, common_1.getDataSource)().manager, user, profilePermission, req);
|
|
56
50
|
if (typeof pp === 'boolean')
|
|
57
51
|
return pp;
|
|
58
52
|
return true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"check-permission.guard.js","sourceRoot":"","sources":["../../src/permissions/check-permission.guard.ts"],"names":[],"mappings":";;;AAAA,mCAA8B;
|
|
1
|
+
{"version":3,"file":"check-permission.guard.js","sourceRoot":"","sources":["../../src/permissions/check-permission.guard.ts"],"names":[],"mappings":";;;AAAA,mCAA8B;AAE9B,sCAA6E;AAC7E,sCAAoD;AACpD,+CAAwD;AAuDjD,KAAK,UAAU,yBAAyB,CAC7C,cAAsB,EACtB,GAAqB;IAErB,MAAM,OAAO,GAAG,IAAA,oBAAW,GAAE,CAAC;IAC9B,IAAI,CAAC,OAAO,IAAI,CAAC,OAAO,CAAC,EAAE;QAAE,OAAO,KAAK,CAAC;IAE1C,MAAM,GAAG,GAAG,IAAA,mBAAU,GAAE,CAAC;IAEzB,MAAM,IAAI,GAAG,MAAM,IAAA,sBAAa,GAAE,CAAC,OAAO,CAAC,OAAO,CAAC,aAAI,EAAE;QACvD,KAAK,EAAE,EAAE,EAAE,EAAE,OAAO,CAAC,EAAE,EAAE;QACzB,SAAS,EAAE,CAAC,YAAY,EAAE,qBAAqB,EAA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,aAAa;QAAE,OAAO,KAAK,CAAC;IAEnD,IAAI,UAAU,CAAC,WAAW,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IAErD,IAAI,iBAAiB,CAAC,WAAW,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,KAAK,CAAC;IAE7D,MAAM,EAAE,GAAG,GAAG,EAAE,CAAC,UAAU,CAAC,SAAmC,CAAC,CAAC;IAEjE,IAAI,EAAE,KAAK,IAAI,IAAI,EAAE,KAAK,SAAS;QAAE,OAAO,IAAI,CAAC;IACjD,IAAI,OAAO,EAAE,KAAK,UAAU;QAAE,OAAO,EAAE,CAAC,IAAA,sBAAa,GAAE,CAAC,OAAO,EAAE,IAAI,EAAE,iBAAiB,EAAE,GAAG,CAAC,CAAC;IAC/F,IAAI,OAAO,EAAE,KAAK,SAAS;QAAE,OAAO,EAAE,CAAC;IAEvC,OAAO,IAAI,CAAC;AACd,CAAC;AAhDD,8DAgDC"}
|
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
export { EnrollXDefaultProfiles } from './app-permissions/enroll-x-permissions';
|
|
2
|
-
export { ExamsDefaultProfiles } from './app-permissions/exams-permissions';
|
|
3
|
-
export { PaymentsDefaultProfiles } from './app-permissions/payments-permissions';
|
|
4
|
-
export { SquareDefaultProfiles } from './app-permissions/square-permissions';
|
|
5
|
-
export { HostelsDefaultProfiles } from './app-permissions/hostels-permissions';
|
|
6
|
-
export { PeopleDefaultProfiles } from './app-permissions/people-x-permissions';
|
|
7
|
-
export { CommuteXDefaultProfiles } from './app-permissions/commute-x-permissions';
|
|
8
1
|
export { CheckPermissions } from './check-permission.guard';
|
|
9
2
|
export * from './permissions';
|
|
10
3
|
//# sourceMappingURL=index.d.ts.map
|