@loopback/example-access-control-migration 4.1.1 → 5.0.1
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/.eslintrc.js +1 -1
- package/CHANGELOG.md +30 -0
- package/LICENSE +1 -1
- package/dist/__tests__/acceptance/project.acceptance.js +1 -1
- package/dist/__tests__/acceptance/project.acceptance.js.map +1 -1
- package/dist/application.d.ts +3 -3
- package/dist/application.js +2 -2
- package/dist/application.js.map +1 -1
- package/dist/components/casbin-authorization/casbin-authorization-component.js +1 -1
- package/dist/components/casbin-authorization/casbin-authorization-component.js.map +1 -1
- package/dist/components/casbin-authorization/index.js +3 -3
- package/dist/components/casbin-authorization/index.js.map +1 -1
- package/dist/components/casbin-authorization/services/assign-project-instance-id.voter.js +1 -1
- package/dist/components/casbin-authorization/services/assign-project-instance-id.voter.js.map +1 -1
- package/dist/components/casbin-authorization/services/casbin.authorizer.js +4 -4
- package/dist/components/casbin-authorization/services/casbin.authorizer.js.map +1 -1
- package/dist/components/casbin-authorization/services/casbin.enforcers.js +3 -3
- package/dist/components/casbin-authorization/services/casbin.enforcers.js.map +1 -1
- package/dist/components/casbin-authorization/services/index.js +4 -4
- package/dist/components/casbin-authorization/services/index.js.map +1 -1
- package/dist/components/jwt-authentication/index.js +4 -4
- package/dist/components/jwt-authentication/index.js.map +1 -1
- package/dist/components/jwt-authentication/jwt-authentication-component.js +4 -4
- package/dist/components/jwt-authentication/jwt-authentication-component.js.map +1 -1
- package/dist/components/jwt-authentication/keys.js +1 -1
- package/dist/components/jwt-authentication/keys.js.map +1 -1
- package/dist/components/jwt-authentication/services/index.js +5 -5
- package/dist/components/jwt-authentication/services/index.js.map +1 -1
- package/dist/components/jwt-authentication/services/jwt.auth.strategy.js +4 -4
- package/dist/components/jwt-authentication/services/jwt.auth.strategy.js.map +1 -1
- package/dist/components/jwt-authentication/services/jwt.service.js +5 -5
- package/dist/components/jwt-authentication/services/jwt.service.js.map +1 -1
- package/dist/components/jwt-authentication/services/security.spec.d.ts +1 -1
- package/dist/components/jwt-authentication/services/security.spec.js +1 -1
- package/dist/components/jwt-authentication/services/security.spec.js.map +1 -1
- package/dist/components/jwt-authentication/services/user.service.js +4 -4
- package/dist/components/jwt-authentication/services/user.service.js.map +1 -1
- package/dist/controllers/index.js +3 -3
- package/dist/controllers/index.js.map +1 -1
- package/dist/controllers/project.controller.js +30 -30
- package/dist/controllers/project.controller.js.map +1 -1
- package/dist/controllers/user.controller.js +10 -10
- package/dist/controllers/user.controller.js.map +1 -1
- package/dist/datasources/db.datasource.js +4 -4
- package/dist/datasources/db.datasource.js.map +1 -1
- package/dist/datasources/index.js +2 -2
- package/dist/datasources/index.js.map +1 -1
- package/dist/index.js +5 -5
- package/dist/index.js.map +1 -1
- package/dist/keys.js +1 -1
- package/dist/keys.js.map +1 -1
- package/dist/migrate.js +1 -1
- package/dist/migrate.js.map +1 -1
- package/dist/models/index.js +5 -5
- package/dist/models/index.js.map +1 -1
- package/dist/models/project.model.js +11 -11
- package/dist/models/project.model.js.map +1 -1
- package/dist/models/team.model.js +9 -9
- package/dist/models/team.model.js.map +1 -1
- package/dist/models/user-credentials.model.js +9 -9
- package/dist/models/user-credentials.model.js.map +1 -1
- package/dist/models/user.model.js +19 -19
- package/dist/models/user.model.js.map +1 -1
- package/dist/observers/index.js +2 -2
- package/dist/observers/index.js.map +1 -1
- package/dist/observers/sample.observer.d.ts +1 -2
- package/dist/observers/sample.observer.js +9 -9
- package/dist/observers/sample.observer.js.map +1 -1
- package/dist/openapi-spec.js +1 -1
- package/dist/openapi-spec.js.map +1 -1
- package/dist/repositories/index.d.ts +2 -2
- package/dist/repositories/index.js +5 -5
- package/dist/repositories/index.js.map +1 -1
- package/dist/repositories/project.repository.js +5 -5
- package/dist/repositories/project.repository.js.map +1 -1
- package/dist/repositories/team.repository.d.ts +1 -1
- package/dist/repositories/team.repository.js +6 -6
- package/dist/repositories/team.repository.js.map +1 -1
- package/dist/repositories/user-credentials.repository.d.ts +1 -1
- package/dist/repositories/user-credentials.repository.js +6 -6
- package/dist/repositories/user-credentials.repository.js.map +1 -1
- package/dist/repositories/user.repository.js +6 -6
- package/dist/repositories/user.repository.js.map +1 -1
- package/dist/sequence.js +1 -1
- package/dist/sequence.js.map +1 -1
- package/package.json +23 -23
- package/src/__tests__/acceptance/project.acceptance.ts +1 -1
- package/src/application.ts +1 -1
- package/src/components/casbin-authorization/casbin-authorization-component.ts +1 -1
- package/src/components/casbin-authorization/index.ts +1 -1
- package/src/components/casbin-authorization/services/assign-project-instance-id.voter.ts +1 -1
- package/src/components/casbin-authorization/services/casbin.authorizer.ts +1 -1
- package/src/components/casbin-authorization/services/casbin.enforcers.ts +1 -1
- package/src/components/casbin-authorization/services/index.ts +1 -1
- package/src/components/jwt-authentication/index.ts +1 -1
- package/src/components/jwt-authentication/jwt-authentication-component.ts +1 -1
- package/src/components/jwt-authentication/keys.ts +1 -1
- package/src/components/jwt-authentication/services/index.ts +1 -1
- package/src/components/jwt-authentication/services/jwt.auth.strategy.ts +1 -1
- package/src/components/jwt-authentication/services/jwt.service.ts +1 -1
- package/src/components/jwt-authentication/services/security.spec.ts +2 -2
- package/src/components/jwt-authentication/services/user.service.ts +1 -1
- package/src/controllers/index.ts +1 -1
- package/src/controllers/project.controller.ts +1 -1
- package/src/controllers/user.controller.ts +1 -1
- package/src/datasources/db.datasource.ts +1 -1
- package/src/datasources/index.ts +1 -1
- package/src/index.ts +1 -1
- package/src/keys.ts +1 -1
- package/src/migrate.ts +1 -1
- package/src/models/index.ts +1 -1
- package/src/models/project.model.ts +1 -1
- package/src/models/team.model.ts +1 -1
- package/src/models/user-credentials.model.ts +1 -1
- package/src/models/user.model.ts +1 -1
- package/src/observers/index.ts +1 -1
- package/src/observers/sample.observer.ts +3 -3
- package/src/openapi-spec.ts +1 -1
- package/src/repositories/index.ts +3 -3
- package/src/repositories/project.repository.ts +1 -1
- package/src/repositories/team.repository.ts +3 -3
- package/src/repositories/user-credentials.repository.ts +3 -3
- package/src/repositories/user.repository.ts +1 -1
- package/src/sequence.ts +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
// Copyright IBM Corp. 2020. All Rights Reserved.
|
|
2
|
+
// Copyright IBM Corp. and LoopBack contributors 2020. All Rights Reserved.
|
|
3
3
|
// Node module: @loopback/example-access-control-migration
|
|
4
4
|
// This file is licensed under the MIT License.
|
|
5
5
|
// License text available at https://opensource.org/licenses/MIT
|
|
@@ -10,7 +10,7 @@ const authentication_1 = require("@loopback/authentication");
|
|
|
10
10
|
const authorization_1 = require("@loopback/authorization");
|
|
11
11
|
const repository_1 = require("@loopback/repository");
|
|
12
12
|
const rest_1 = require("@loopback/rest");
|
|
13
|
-
const lodash_1 =
|
|
13
|
+
const lodash_1 = tslib_1.__importDefault(require("lodash"));
|
|
14
14
|
const casbin_authorization_1 = require("../components/casbin-authorization");
|
|
15
15
|
const models_1 = require("../models");
|
|
16
16
|
const repositories_1 = require("../repositories");
|
|
@@ -79,7 +79,7 @@ let ProjectController = class ProjectController {
|
|
|
79
79
|
// TBD: return new balance
|
|
80
80
|
}
|
|
81
81
|
};
|
|
82
|
-
|
|
82
|
+
tslib_1.__decorate([
|
|
83
83
|
(0, rest_1.get)('/list-projects', {
|
|
84
84
|
responses: {
|
|
85
85
|
'200': {
|
|
@@ -98,11 +98,11 @@ let ProjectController = class ProjectController {
|
|
|
98
98
|
},
|
|
99
99
|
},
|
|
100
100
|
}),
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
101
|
+
tslib_1.__metadata("design:type", Function),
|
|
102
|
+
tslib_1.__metadata("design:paramtypes", []),
|
|
103
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
104
104
|
], ProjectController.prototype, "listProjects", null);
|
|
105
|
-
|
|
105
|
+
tslib_1.__decorate([
|
|
106
106
|
(0, rest_1.get)('/view-all-projects', {
|
|
107
107
|
responses: {
|
|
108
108
|
'200': {
|
|
@@ -120,11 +120,11 @@ let ProjectController = class ProjectController {
|
|
|
120
120
|
}),
|
|
121
121
|
(0, authentication_1.authenticate)('jwt'),
|
|
122
122
|
(0, authorization_1.authorize)(ACL_PROJECT['view-all']),
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
123
|
+
tslib_1.__metadata("design:type", Function),
|
|
124
|
+
tslib_1.__metadata("design:paramtypes", []),
|
|
125
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
126
126
|
], ProjectController.prototype, "viewAll", null);
|
|
127
|
-
|
|
127
|
+
tslib_1.__decorate([
|
|
128
128
|
(0, rest_1.get)('/projects/{id}/show-balance', {
|
|
129
129
|
responses: {
|
|
130
130
|
'200': {
|
|
@@ -139,12 +139,12 @@ let ProjectController = class ProjectController {
|
|
|
139
139
|
}),
|
|
140
140
|
(0, authentication_1.authenticate)('jwt'),
|
|
141
141
|
(0, authorization_1.authorize)(ACL_PROJECT['show-balance']),
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
142
|
+
tslib_1.__param(0, rest_1.param.path.number('id')),
|
|
143
|
+
tslib_1.__metadata("design:type", Function),
|
|
144
|
+
tslib_1.__metadata("design:paramtypes", [Number]),
|
|
145
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
146
146
|
], ProjectController.prototype, "findById", null);
|
|
147
|
-
|
|
147
|
+
tslib_1.__decorate([
|
|
148
148
|
(0, rest_1.patch)('/projects/{id}/donate', {
|
|
149
149
|
responses: {
|
|
150
150
|
'204': {
|
|
@@ -154,13 +154,13 @@ let ProjectController = class ProjectController {
|
|
|
154
154
|
}),
|
|
155
155
|
(0, authentication_1.authenticate)('jwt'),
|
|
156
156
|
(0, authorization_1.authorize)(ACL_PROJECT.donate),
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
157
|
+
tslib_1.__param(0, rest_1.param.path.number('id')),
|
|
158
|
+
tslib_1.__param(1, rest_1.param.query.number('amount')),
|
|
159
|
+
tslib_1.__metadata("design:type", Function),
|
|
160
|
+
tslib_1.__metadata("design:paramtypes", [Number, Number]),
|
|
161
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
162
162
|
], ProjectController.prototype, "donateById", null);
|
|
163
|
-
|
|
163
|
+
tslib_1.__decorate([
|
|
164
164
|
(0, rest_1.patch)('/projects/{id}/withdraw', {
|
|
165
165
|
responses: {
|
|
166
166
|
'204': {
|
|
@@ -170,15 +170,15 @@ let ProjectController = class ProjectController {
|
|
|
170
170
|
}),
|
|
171
171
|
(0, authentication_1.authenticate)('jwt'),
|
|
172
172
|
(0, authorization_1.authorize)(ACL_PROJECT.withdraw),
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
173
|
+
tslib_1.__param(0, rest_1.param.path.number('id')),
|
|
174
|
+
tslib_1.__param(1, rest_1.param.query.number('amount')),
|
|
175
|
+
tslib_1.__metadata("design:type", Function),
|
|
176
|
+
tslib_1.__metadata("design:paramtypes", [Number, Number]),
|
|
177
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
178
178
|
], ProjectController.prototype, "withdrawById", null);
|
|
179
|
-
ProjectController =
|
|
180
|
-
|
|
181
|
-
|
|
179
|
+
ProjectController = tslib_1.__decorate([
|
|
180
|
+
tslib_1.__param(0, (0, repository_1.repository)(repositories_1.ProjectRepository)),
|
|
181
|
+
tslib_1.__metadata("design:paramtypes", [repositories_1.ProjectRepository])
|
|
182
182
|
], ProjectController);
|
|
183
183
|
exports.ProjectController = ProjectController;
|
|
184
184
|
//# sourceMappingURL=project.controller.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project.controller.js","sourceRoot":"","sources":["../../src/controllers/project.controller.ts"],"names":[],"mappings":";AAAA,
|
|
1
|
+
{"version":3,"file":"project.controller.js","sourceRoot":"","sources":["../../src/controllers/project.controller.ts"],"names":[],"mappings":";AAAA,2EAA2E;AAC3E,0DAA0D;AAC1D,+CAA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C,MAAM,CAAC,QAAQ,CAAC,CAAA;;;;mDAO9B;AAYD;IATC,IAAA,YAAK,EAAC,yBAAyB,EAAE;QAChC,SAAS,EAAE;YACT,KAAK,EAAE;gBACL,WAAW,EAAE,0BAA0B;aACxC;SACF;KACF,CAAC;IACD,IAAA,6BAAY,EAAC,KAAK,CAAC;IACnB,IAAA,yBAAS,EAAC,WAAW,CAAC,QAAQ,CAAC;IAE7B,mBAAA,YAAK,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;IACvB,mBAAA,YAAK,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAA;;;;qDAU9B;AAlHU,iBAAiB;IAEzB,mBAAA,IAAA,uBAAU,EAAC,gCAAiB,CAAC,CAAA;6CACJ,gCAAiB;GAHlC,iBAAiB,CAmH7B;AAnHY,8CAAiB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
// Copyright IBM Corp. 2020. All Rights Reserved.
|
|
2
|
+
// Copyright IBM Corp. and LoopBack contributors 2020. All Rights Reserved.
|
|
3
3
|
// Node module: @loopback/example-access-control-migration
|
|
4
4
|
// This file is licensed under the MIT License.
|
|
5
5
|
// License text available at https://opensource.org/licenses/MIT
|
|
@@ -45,7 +45,7 @@ let UserController = class UserController {
|
|
|
45
45
|
return { token };
|
|
46
46
|
}
|
|
47
47
|
};
|
|
48
|
-
|
|
48
|
+
tslib_1.__decorate([
|
|
49
49
|
(0, rest_1.post)('/users/login', {
|
|
50
50
|
responses: {
|
|
51
51
|
'200': {
|
|
@@ -65,15 +65,15 @@ let UserController = class UserController {
|
|
|
65
65
|
},
|
|
66
66
|
},
|
|
67
67
|
}),
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
68
|
+
tslib_1.__param(0, (0, rest_1.requestBody)(exports.CredentialsRequestBody)),
|
|
69
|
+
tslib_1.__metadata("design:type", Function),
|
|
70
|
+
tslib_1.__metadata("design:paramtypes", [Object]),
|
|
71
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
72
72
|
], UserController.prototype, "login", null);
|
|
73
|
-
UserController =
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
73
|
+
UserController = tslib_1.__decorate([
|
|
74
|
+
tslib_1.__param(0, (0, core_1.inject)(jwt_authentication_1.TokenServiceBindings.TOKEN_SERVICE)),
|
|
75
|
+
tslib_1.__param(1, (0, core_1.inject)(jwt_authentication_1.UserServiceBindings.USER_SERVICE)),
|
|
76
|
+
tslib_1.__metadata("design:paramtypes", [Object, Object])
|
|
77
77
|
], UserController);
|
|
78
78
|
exports.UserController = UserController;
|
|
79
79
|
//# sourceMappingURL=user.controller.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user.controller.js","sourceRoot":"","sources":["../../src/controllers/user.controller.ts"],"names":[],"mappings":";AAAA,
|
|
1
|
+
{"version":3,"file":"user.controller.js","sourceRoot":"","sources":["../../src/controllers/user.controller.ts"],"names":[],"mappings":";AAAA,2EAA2E;AAC3E,0DAA0D;AAC1D,+CAA+C;AAC/C,gEAAgE;;;;AAKhE,yCAAsC;AACtC,yCAA+D;AAC/D,yEAI0C;AAG1C,MAAM,iBAAiB,GAAiB;IACtC,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE,CAAC,OAAO,EAAE,UAAU,CAAC;IAC/B,UAAU,EAAE;QACV,KAAK,EAAE;YACL,IAAI,EAAE,QAAQ;YACd,MAAM,EAAE,OAAO;SAChB;QACD,QAAQ,EAAE;YACR,IAAI,EAAE,QAAQ;YACd,SAAS,EAAE,CAAC;SACb;KACF;CACF,CAAC;AAEW,QAAA,sBAAsB,GAAG;IACpC,WAAW,EAAE,6BAA6B;IAC1C,QAAQ,EAAE,IAAI;IACd,OAAO,EAAE;QACP,kBAAkB,EAAE,EAAC,MAAM,EAAE,iBAAiB,EAAC;KAChD;CACF,CAAC;AAEF,IAAa,cAAc,GAA3B,MAAa,cAAc;IACzB,YAES,UAAwB,EAExB,WAA2C;QAF3C,eAAU,GAAV,UAAU,CAAc;QAExB,gBAAW,GAAX,WAAW,CAAgC;IACjD,CAAC;IAqBJ,KAAK,CAAC,KAAK,CAC4B,WAAwB;QAE7D,sDAAsD;QACtD,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,iBAAiB,CAAC,WAAW,CAAC,CAAC;QAEnE,8EAA8E;QAC9E,MAAM,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC,oBAAoB,CAAC,IAAI,CAAC,CAAC;QAEhE,oDAAoD;QACpD,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC;QAE/D,OAAO,EAAC,KAAK,EAAC,CAAC;IACjB,CAAC;CACF,CAAA;AAdC;IAnBC,IAAA,WAAI,EAAC,cAAc,EAAE;QACpB,SAAS,EAAE;YACT,KAAK,EAAE;gBACL,WAAW,EAAE,OAAO;gBACpB,OAAO,EAAE;oBACP,kBAAkB,EAAE;wBAClB,MAAM,EAAE;4BACN,IAAI,EAAE,QAAQ;4BACd,UAAU,EAAE;gCACV,KAAK,EAAE;oCACL,IAAI,EAAE,QAAQ;iCACf;6BACF;yBACF;qBACF;iBACF;aACF;SACF;KACF,CAAC;IAEC,mBAAA,IAAA,kBAAW,EAAC,8BAAsB,CAAC,CAAA;;;;2CAYrC;AAxCU,cAAc;IAEtB,mBAAA,IAAA,aAAM,EAAC,yCAAoB,CAAC,aAAa,CAAC,CAAA;IAE1C,mBAAA,IAAA,aAAM,EAAC,wCAAmB,CAAC,YAAY,CAAC,CAAA;;GAJhC,cAAc,CAyC1B;AAzCY,wCAAc"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
// Copyright IBM Corp. 2020. All Rights Reserved.
|
|
2
|
+
// Copyright IBM Corp. and LoopBack contributors 2020. All Rights Reserved.
|
|
3
3
|
// Node module: @loopback/example-access-control-migration
|
|
4
4
|
// This file is licensed under the MIT License.
|
|
5
5
|
// License text available at https://opensource.org/licenses/MIT
|
|
@@ -21,9 +21,9 @@ let DbDataSource = class DbDataSource extends repository_1.juggler.DataSource {
|
|
|
21
21
|
};
|
|
22
22
|
DbDataSource.dataSourceName = 'db';
|
|
23
23
|
DbDataSource.defaultConfig = config;
|
|
24
|
-
DbDataSource =
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
DbDataSource = tslib_1.__decorate([
|
|
25
|
+
tslib_1.__param(0, (0, core_1.inject)('datasources.config.db', { optional: true })),
|
|
26
|
+
tslib_1.__metadata("design:paramtypes", [Object])
|
|
27
27
|
], DbDataSource);
|
|
28
28
|
exports.DbDataSource = DbDataSource;
|
|
29
29
|
//# sourceMappingURL=db.datasource.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"db.datasource.js","sourceRoot":"","sources":["../../src/datasources/db.datasource.ts"],"names":[],"mappings":";AAAA,
|
|
1
|
+
{"version":3,"file":"db.datasource.js","sourceRoot":"","sources":["../../src/datasources/db.datasource.ts"],"names":[],"mappings":";AAAA,2EAA2E;AAC3E,0DAA0D;AAC1D,+CAA+C;AAC/C,gEAAgE;;;;AAEhE,yCAAsC;AACtC,qDAA6C;AAE7C,MAAM,MAAM,GAAG;IACb,IAAI,EAAE,IAAI;IACV,SAAS,EAAE,QAAQ;IACnB,YAAY,EAAE,EAAE;IAChB,IAAI,EAAE,gBAAgB;CACvB,CAAC;AAEF,IAAa,YAAY,GAAzB,MAAa,YAAa,SAAQ,oBAAO,CAAC,UAAU;IAIlD,YAEE,WAAmB,MAAM;QAEzB,KAAK,CAAC,QAAQ,CAAC,CAAC;IAClB,CAAC;CACF,CAAA;AATQ,2BAAc,GAAG,IAAI,CAAC;AACb,0BAAa,GAAG,MAAO,CAAA;AAF5B,YAAY;IAKpB,mBAAA,IAAA,aAAM,EAAC,uBAAuB,EAAE,EAAC,QAAQ,EAAE,IAAI,EAAC,CAAC,CAAA;;GALzC,YAAY,CAUxB;AAVY,oCAAY"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
// Copyright IBM Corp. 2020. All Rights Reserved.
|
|
2
|
+
// Copyright IBM Corp. and LoopBack contributors 2020. All Rights Reserved.
|
|
3
3
|
// Node module: @loopback/example-access-control-migration
|
|
4
4
|
// This file is licensed under the MIT License.
|
|
5
5
|
// License text available at https://opensource.org/licenses/MIT
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
7
|
const tslib_1 = require("tslib");
|
|
8
|
-
|
|
8
|
+
tslib_1.__exportStar(require("./db.datasource"), exports);
|
|
9
9
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/datasources/index.ts"],"names":[],"mappings":";AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/datasources/index.ts"],"names":[],"mappings":";AAAA,2EAA2E;AAC3E,0DAA0D;AAC1D,+CAA+C;AAC/C,gEAAgE;;;AAEhE,0DAAgC"}
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
// Copyright IBM Corp. 2020. All Rights Reserved.
|
|
2
|
+
// Copyright IBM Corp. and LoopBack contributors 2020. All Rights Reserved.
|
|
3
3
|
// Node module: @loopback/example-access-control-migration
|
|
4
4
|
// This file is licensed under the MIT License.
|
|
5
5
|
// License text available at https://opensource.org/licenses/MIT
|
|
@@ -18,10 +18,10 @@ async function main(options = {}) {
|
|
|
18
18
|
}
|
|
19
19
|
exports.main = main;
|
|
20
20
|
// re-exports for our benchmark, not needed for the tutorial itself
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
tslib_1.__exportStar(require("@loopback/rest"), exports);
|
|
22
|
+
tslib_1.__exportStar(require("./application"), exports);
|
|
23
|
+
tslib_1.__exportStar(require("./models"), exports);
|
|
24
|
+
tslib_1.__exportStar(require("./repositories"), exports);
|
|
25
25
|
// Start the server when loaded via `node .`
|
|
26
26
|
if (require.main === module) {
|
|
27
27
|
// Run the application
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,2EAA2E;AAC3E,0DAA0D;AAC1D,+CAA+C;AAC/C,gEAAgE;;;;;AAEhE,+CAA0E;AAEnE,KAAK,UAAU,IAAI,CAAC,UAA6B,EAAE;IACxD,MAAM,GAAG,GAAG,IAAI,sCAAwB,CAAC,OAAO,CAAC,CAAC;IAClD,MAAM,GAAG,CAAC,IAAI,EAAE,CAAC;IACjB,MAAM,GAAG,CAAC,KAAK,EAAE,CAAC;IAElB,MAAM,GAAG,GAAG,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC;IAC/B,OAAO,CAAC,GAAG,CAAC,wBAAwB,GAAG,EAAE,CAAC,CAAC;IAC3C,OAAO,GAAG,CAAC;AACb,CAAC;AARD,oBAQC;AAED,mEAAmE;AACnE,yDAA+B;AAC/B,wDAA8B;AAC9B,mDAAyB;AACzB,yDAA+B;AAE/B,4CAA4C;AAC5C,IAAI,OAAO,CAAC,IAAI,KAAK,MAAM,EAAE;IAC3B,sBAAsB;IACtB,MAAM,MAAM,GAAG;QACb,IAAI,EAAE;YACJ,IAAI,EAAE,CAAC,CAAC,MAAA,OAAO,CAAC,GAAG,CAAC,IAAI,mCAAI,IAAI,CAAC;YACjC,IAAI,EAAE,MAAA,OAAO,CAAC,GAAG,CAAC,IAAI,mCAAI,WAAW;YACrC,WAAW,EAAE;gBACX,sEAAsE;gBACtE,qBAAqB,EAAE,IAAI;aAC5B;SACF;KACF,CAAC;IACF,IAAI,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE;QACvB,OAAO,CAAC,KAAK,CAAC,+BAA+B,EAAE,GAAG,CAAC,CAAC;QACpD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC,CAAC,CAAC;CACJ"}
|
package/dist/keys.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
// Copyright IBM Corp. 2020. All Rights Reserved.
|
|
2
|
+
// Copyright IBM Corp. and LoopBack contributors 2020. All Rights Reserved.
|
|
3
3
|
// Node module: @loopback/example-access-control-migration
|
|
4
4
|
// This file is licensed under the MIT License.
|
|
5
5
|
// License text available at https://opensource.org/licenses/MIT
|
package/dist/keys.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keys.js","sourceRoot":"","sources":["../src/keys.ts"],"names":[],"mappings":";AAAA,
|
|
1
|
+
{"version":3,"file":"keys.js","sourceRoot":"","sources":["../src/keys.ts"],"names":[],"mappings":";AAAA,2EAA2E;AAC3E,0DAA0D;AAC1D,+CAA+C;AAC/C,gEAAgE;;;AAEhE,yCAA0C;AAE7B,QAAA,WAAW,GAAG,iBAAU,CAAC,MAAM,CAAS,YAAY,CAAC,CAAC"}
|
package/dist/migrate.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
// Copyright IBM Corp. 2020. All Rights Reserved.
|
|
2
|
+
// Copyright IBM Corp. and LoopBack contributors 2020. All Rights Reserved.
|
|
3
3
|
// Node module: @loopback/example-access-control-migration
|
|
4
4
|
// This file is licensed under the MIT License.
|
|
5
5
|
// License text available at https://opensource.org/licenses/MIT
|
package/dist/migrate.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"migrate.js","sourceRoot":"","sources":["../src/migrate.ts"],"names":[],"mappings":";AAAA,
|
|
1
|
+
{"version":3,"file":"migrate.js","sourceRoot":"","sources":["../src/migrate.ts"],"names":[],"mappings":";AAAA,2EAA2E;AAC3E,0DAA0D;AAC1D,+CAA+C;AAC/C,gEAAgE;;;AAEhE,+CAAuD;AAEhD,KAAK,UAAU,OAAO,CAAC,IAAc;IAC1C,MAAM,cAAc,GAAG,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC;IACrE,OAAO,CAAC,GAAG,CAAC,wCAAwC,EAAE,cAAc,CAAC,CAAC;IAEtE,MAAM,GAAG,GAAG,IAAI,sCAAwB,EAAE,CAAC;IAC3C,MAAM,GAAG,CAAC,IAAI,EAAE,CAAC;IACjB,MAAM,GAAG,CAAC,aAAa,CAAC,EAAC,cAAc,EAAC,CAAC,CAAC;IAE1C,wDAAwD;IACxD,8DAA8D;IAC9D,8BAA8B;IAC9B,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC;AAZD,0BAYC;AAED,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE;IAChC,OAAO,CAAC,KAAK,CAAC,gCAAgC,EAAE,GAAG,CAAC,CAAC;IACrD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
|
package/dist/models/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
// Copyright IBM Corp. 2020. All Rights Reserved.
|
|
2
|
+
// Copyright IBM Corp. and LoopBack contributors 2020. All Rights Reserved.
|
|
3
3
|
// Node module: @loopback/example-access-control-migration
|
|
4
4
|
// This file is licensed under the MIT License.
|
|
5
5
|
// License text available at https://opensource.org/licenses/MIT
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
7
|
const tslib_1 = require("tslib");
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
tslib_1.__exportStar(require("./project.model"), exports);
|
|
9
|
+
tslib_1.__exportStar(require("./team.model"), exports);
|
|
10
|
+
tslib_1.__exportStar(require("./user-credentials.model"), exports);
|
|
11
|
+
tslib_1.__exportStar(require("./user.model"), exports);
|
|
12
12
|
//# sourceMappingURL=index.js.map
|
package/dist/models/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/models/index.ts"],"names":[],"mappings":";AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/models/index.ts"],"names":[],"mappings":";AAAA,2EAA2E;AAC3E,0DAA0D;AAC1D,+CAA+C;AAC/C,gEAAgE;;;AAEhE,0DAAgC;AAChC,uDAA6B;AAC7B,mEAAyC;AACzC,uDAA6B"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
// Copyright IBM Corp. 2020. All Rights Reserved.
|
|
2
|
+
// Copyright IBM Corp. and LoopBack contributors 2020. All Rights Reserved.
|
|
3
3
|
// Node module: @loopback/example-access-control-migration
|
|
4
4
|
// This file is licensed under the MIT License.
|
|
5
5
|
// License text available at https://opensource.org/licenses/MIT
|
|
@@ -13,34 +13,34 @@ let Project = class Project extends repository_1.Entity {
|
|
|
13
13
|
super(data);
|
|
14
14
|
}
|
|
15
15
|
};
|
|
16
|
-
|
|
16
|
+
tslib_1.__decorate([
|
|
17
17
|
(0, repository_1.property)({
|
|
18
18
|
type: 'number',
|
|
19
19
|
id: 1,
|
|
20
20
|
generated: false,
|
|
21
21
|
updateOnly: true,
|
|
22
22
|
}),
|
|
23
|
-
|
|
23
|
+
tslib_1.__metadata("design:type", Number)
|
|
24
24
|
], Project.prototype, "id", void 0);
|
|
25
|
-
|
|
25
|
+
tslib_1.__decorate([
|
|
26
26
|
(0, repository_1.property)({
|
|
27
27
|
type: 'string',
|
|
28
28
|
}),
|
|
29
|
-
|
|
29
|
+
tslib_1.__metadata("design:type", String)
|
|
30
30
|
], Project.prototype, "name", void 0);
|
|
31
|
-
|
|
31
|
+
tslib_1.__decorate([
|
|
32
32
|
(0, repository_1.property)({
|
|
33
33
|
type: 'number',
|
|
34
34
|
}),
|
|
35
|
-
|
|
35
|
+
tslib_1.__metadata("design:type", Number)
|
|
36
36
|
], Project.prototype, "balance", void 0);
|
|
37
|
-
|
|
37
|
+
tslib_1.__decorate([
|
|
38
38
|
(0, repository_1.belongsTo)(() => user_model_1.User),
|
|
39
|
-
|
|
39
|
+
tslib_1.__metadata("design:type", Number)
|
|
40
40
|
], Project.prototype, "ownerId", void 0);
|
|
41
|
-
Project =
|
|
41
|
+
Project = tslib_1.__decorate([
|
|
42
42
|
(0, repository_1.model)({ settings: { strict: false } }),
|
|
43
|
-
|
|
43
|
+
tslib_1.__metadata("design:paramtypes", [Object])
|
|
44
44
|
], Project);
|
|
45
45
|
exports.Project = Project;
|
|
46
46
|
//# sourceMappingURL=project.model.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project.model.js","sourceRoot":"","sources":["../../src/models/project.model.ts"],"names":[],"mappings":";AAAA,
|
|
1
|
+
{"version":3,"file":"project.model.js","sourceRoot":"","sources":["../../src/models/project.model.ts"],"names":[],"mappings":";AAAA,2EAA2E;AAC3E,0DAA0D;AAC1D,+CAA+C;AAC/C,gEAAgE;;;;AAEhE,qDAAwE;AACxE,6CAAkC;AAGlC,IAAa,OAAO,GAApB,MAAa,OAAQ,SAAQ,mBAAM;IA4BjC,YAAY,IAAuB;QACjC,KAAK,CAAC,IAAI,CAAC,CAAC;IACd,CAAC;CACF,CAAA;AAxBC;IANC,IAAA,qBAAQ,EAAC;QACR,IAAI,EAAE,QAAQ;QACd,EAAE,EAAE,CAAC;QACL,SAAS,EAAE,KAAK;QAChB,UAAU,EAAE,IAAI;KACjB,CAAC;;mCACS;AAKX;IAHC,IAAA,qBAAQ,EAAC;QACR,IAAI,EAAE,QAAQ;KACf,CAAC;;qCACY;AAKd;IAHC,IAAA,qBAAQ,EAAC;QACR,IAAI,EAAE,QAAQ;KACf,CAAC;;wCACc;AAGhB;IADC,IAAA,sBAAS,EAAC,GAAG,EAAE,CAAC,iBAAI,CAAC;;wCACN;AApBL,OAAO;IADnB,IAAA,kBAAK,EAAC,EAAC,QAAQ,EAAE,EAAC,MAAM,EAAE,KAAK,EAAC,EAAC,CAAC;;GACtB,OAAO,CA+BnB;AA/BY,0BAAO"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
// Copyright IBM Corp. 2020. All Rights Reserved.
|
|
2
|
+
// Copyright IBM Corp. and LoopBack contributors 2020. All Rights Reserved.
|
|
3
3
|
// Node module: @loopback/example-access-control-migration
|
|
4
4
|
// This file is licensed under the MIT License.
|
|
5
5
|
// License text available at https://opensource.org/licenses/MIT
|
|
@@ -12,33 +12,33 @@ let Team = class Team extends repository_1.Entity {
|
|
|
12
12
|
super(data);
|
|
13
13
|
}
|
|
14
14
|
};
|
|
15
|
-
|
|
15
|
+
tslib_1.__decorate([
|
|
16
16
|
(0, repository_1.property)({
|
|
17
17
|
type: 'number',
|
|
18
18
|
id: 1,
|
|
19
19
|
generated: false,
|
|
20
20
|
updateOnly: true,
|
|
21
21
|
}),
|
|
22
|
-
|
|
22
|
+
tslib_1.__metadata("design:type", Number)
|
|
23
23
|
], Team.prototype, "id", void 0);
|
|
24
|
-
|
|
24
|
+
tslib_1.__decorate([
|
|
25
25
|
(0, repository_1.property)({
|
|
26
26
|
type: 'number',
|
|
27
27
|
required: true,
|
|
28
28
|
}),
|
|
29
|
-
|
|
29
|
+
tslib_1.__metadata("design:type", Number)
|
|
30
30
|
], Team.prototype, "ownerId", void 0);
|
|
31
|
-
|
|
31
|
+
tslib_1.__decorate([
|
|
32
32
|
(0, repository_1.property)({
|
|
33
33
|
type: 'array',
|
|
34
34
|
itemType: 'number',
|
|
35
35
|
required: true,
|
|
36
36
|
}),
|
|
37
|
-
|
|
37
|
+
tslib_1.__metadata("design:type", Array)
|
|
38
38
|
], Team.prototype, "memberIds", void 0);
|
|
39
|
-
Team =
|
|
39
|
+
Team = tslib_1.__decorate([
|
|
40
40
|
(0, repository_1.model)({ settings: { strict: false } }),
|
|
41
|
-
|
|
41
|
+
tslib_1.__metadata("design:paramtypes", [Object])
|
|
42
42
|
], Team);
|
|
43
43
|
exports.Team = Team;
|
|
44
44
|
//# sourceMappingURL=team.model.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"team.model.js","sourceRoot":"","sources":["../../src/models/team.model.ts"],"names":[],"mappings":";AAAA,
|
|
1
|
+
{"version":3,"file":"team.model.js","sourceRoot":"","sources":["../../src/models/team.model.ts"],"names":[],"mappings":";AAAA,2EAA2E;AAC3E,0DAA0D;AAC1D,+CAA+C;AAC/C,gEAAgE;;;;AAEhE,qDAA6D;AAG7D,IAAa,IAAI,GAAjB,MAAa,IAAK,SAAQ,mBAAM;IA4B9B,YAAY,IAAoB;QAC9B,KAAK,CAAC,IAAI,CAAC,CAAC;IACd,CAAC;CACF,CAAA;AAxBC;IANC,IAAA,qBAAQ,EAAC;QACR,IAAI,EAAE,QAAQ;QACd,EAAE,EAAE,CAAC;QACL,SAAS,EAAE,KAAK;QAChB,UAAU,EAAE,IAAI;KACjB,CAAC;;gCACS;AAMX;IAJC,IAAA,qBAAQ,EAAC;QACR,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;KACf,CAAC;;qCACc;AAOhB;IALC,IAAA,qBAAQ,EAAC;QACR,IAAI,EAAE,OAAO;QACb,QAAQ,EAAE,QAAQ;QAClB,QAAQ,EAAE,IAAI;KACf,CAAC;;uCACkB;AApBT,IAAI;IADhB,IAAA,kBAAK,EAAC,EAAC,QAAQ,EAAE,EAAC,MAAM,EAAE,KAAK,EAAC,EAAC,CAAC;;GACtB,IAAI,CA+BhB;AA/BY,oBAAI"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
// Copyright IBM Corp. 2020. All Rights Reserved.
|
|
2
|
+
// Copyright IBM Corp. and LoopBack contributors 2020. All Rights Reserved.
|
|
3
3
|
// Node module: @loopback/example-access-control-migration
|
|
4
4
|
// This file is licensed under the MIT License.
|
|
5
5
|
// License text available at https://opensource.org/licenses/MIT
|
|
@@ -12,30 +12,30 @@ let UserCredentials = class UserCredentials extends repository_1.Entity {
|
|
|
12
12
|
super(data);
|
|
13
13
|
}
|
|
14
14
|
};
|
|
15
|
-
|
|
15
|
+
tslib_1.__decorate([
|
|
16
16
|
(0, repository_1.property)({
|
|
17
17
|
type: 'number',
|
|
18
18
|
id: true,
|
|
19
19
|
}),
|
|
20
|
-
|
|
20
|
+
tslib_1.__metadata("design:type", Number)
|
|
21
21
|
], UserCredentials.prototype, "id", void 0);
|
|
22
|
-
|
|
22
|
+
tslib_1.__decorate([
|
|
23
23
|
(0, repository_1.property)({
|
|
24
24
|
type: 'string',
|
|
25
25
|
required: true,
|
|
26
26
|
}),
|
|
27
|
-
|
|
27
|
+
tslib_1.__metadata("design:type", String)
|
|
28
28
|
], UserCredentials.prototype, "password", void 0);
|
|
29
|
-
|
|
29
|
+
tslib_1.__decorate([
|
|
30
30
|
(0, repository_1.property)({
|
|
31
31
|
type: 'number',
|
|
32
32
|
required: true,
|
|
33
33
|
}),
|
|
34
|
-
|
|
34
|
+
tslib_1.__metadata("design:type", Number)
|
|
35
35
|
], UserCredentials.prototype, "userId", void 0);
|
|
36
|
-
UserCredentials =
|
|
36
|
+
UserCredentials = tslib_1.__decorate([
|
|
37
37
|
(0, repository_1.model)({ settings: { strict: false } }),
|
|
38
|
-
|
|
38
|
+
tslib_1.__metadata("design:paramtypes", [Object])
|
|
39
39
|
], UserCredentials);
|
|
40
40
|
exports.UserCredentials = UserCredentials;
|
|
41
41
|
//# sourceMappingURL=user-credentials.model.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user-credentials.model.js","sourceRoot":"","sources":["../../src/models/user-credentials.model.ts"],"names":[],"mappings":";AAAA,
|
|
1
|
+
{"version":3,"file":"user-credentials.model.js","sourceRoot":"","sources":["../../src/models/user-credentials.model.ts"],"names":[],"mappings":";AAAA,2EAA2E;AAC3E,0DAA0D;AAC1D,+CAA+C;AAC/C,gEAAgE;;;;AAEhE,qDAA6D;AAG7D,IAAa,eAAe,GAA5B,MAAa,eAAgB,SAAQ,mBAAM;IAyBzC,YAAY,IAA+B;QACzC,KAAK,CAAC,IAAI,CAAC,CAAC;IACd,CAAC;CACF,CAAA;AAvBC;IAJC,IAAA,qBAAQ,EAAC;QACR,IAAI,EAAE,QAAQ;QACd,EAAE,EAAE,IAAI;KACT,CAAC;;2CACS;AAMX;IAJC,IAAA,qBAAQ,EAAC;QACR,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;KACf,CAAC;;iDACe;AAMjB;IAJC,IAAA,qBAAQ,EAAC;QACR,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;KACf,CAAC;;+CACa;AAjBJ,eAAe;IAD3B,IAAA,kBAAK,EAAC,EAAC,QAAQ,EAAE,EAAC,MAAM,EAAE,KAAK,EAAC,EAAC,CAAC;;GACtB,eAAe,CA4B3B;AA5BY,0CAAe"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
// Copyright IBM Corp. 2020. All Rights Reserved.
|
|
2
|
+
// Copyright IBM Corp. and LoopBack contributors 2020. All Rights Reserved.
|
|
3
3
|
// Node module: @loopback/example-access-control-migration
|
|
4
4
|
// This file is licensed under the MIT License.
|
|
5
5
|
// License text available at https://opensource.org/licenses/MIT
|
|
@@ -14,61 +14,61 @@ let User = class User extends repository_1.Entity {
|
|
|
14
14
|
super(data);
|
|
15
15
|
}
|
|
16
16
|
};
|
|
17
|
-
|
|
17
|
+
tslib_1.__decorate([
|
|
18
18
|
(0, repository_1.property)({
|
|
19
19
|
type: 'number',
|
|
20
20
|
id: 1,
|
|
21
21
|
generated: false,
|
|
22
22
|
updateOnly: true,
|
|
23
23
|
}),
|
|
24
|
-
|
|
24
|
+
tslib_1.__metadata("design:type", Number)
|
|
25
25
|
], User.prototype, "id", void 0);
|
|
26
|
-
|
|
26
|
+
tslib_1.__decorate([
|
|
27
27
|
(0, repository_1.property)({
|
|
28
28
|
type: 'string',
|
|
29
29
|
}),
|
|
30
|
-
|
|
30
|
+
tslib_1.__metadata("design:type", String)
|
|
31
31
|
], User.prototype, "realm", void 0);
|
|
32
|
-
|
|
32
|
+
tslib_1.__decorate([
|
|
33
33
|
(0, repository_1.property)({
|
|
34
34
|
type: 'string',
|
|
35
35
|
}),
|
|
36
|
-
|
|
36
|
+
tslib_1.__metadata("design:type", String)
|
|
37
37
|
], User.prototype, "username", void 0);
|
|
38
|
-
|
|
38
|
+
tslib_1.__decorate([
|
|
39
39
|
(0, repository_1.property)({
|
|
40
40
|
type: 'string',
|
|
41
41
|
required: true,
|
|
42
42
|
}),
|
|
43
|
-
|
|
43
|
+
tslib_1.__metadata("design:type", String)
|
|
44
44
|
], User.prototype, "email", void 0);
|
|
45
|
-
|
|
45
|
+
tslib_1.__decorate([
|
|
46
46
|
(0, repository_1.property)({
|
|
47
47
|
type: 'boolean',
|
|
48
48
|
}),
|
|
49
|
-
|
|
49
|
+
tslib_1.__metadata("design:type", Boolean)
|
|
50
50
|
], User.prototype, "emailVerified", void 0);
|
|
51
|
-
|
|
51
|
+
tslib_1.__decorate([
|
|
52
52
|
(0, repository_1.property)({
|
|
53
53
|
type: 'string',
|
|
54
54
|
}),
|
|
55
|
-
|
|
55
|
+
tslib_1.__metadata("design:type", String)
|
|
56
56
|
], User.prototype, "verificationToken", void 0);
|
|
57
|
-
|
|
57
|
+
tslib_1.__decorate([
|
|
58
58
|
(0, repository_1.hasOne)(() => user_credentials_model_1.UserCredentials),
|
|
59
|
-
|
|
59
|
+
tslib_1.__metadata("design:type", user_credentials_model_1.UserCredentials)
|
|
60
60
|
], User.prototype, "userCredentials", void 0);
|
|
61
|
-
|
|
61
|
+
tslib_1.__decorate([
|
|
62
62
|
(0, repository_1.hasMany)(() => team_model_1.Team, { keyTo: 'ownerId' }),
|
|
63
|
-
|
|
63
|
+
tslib_1.__metadata("design:type", Array)
|
|
64
64
|
], User.prototype, "teams", void 0);
|
|
65
|
-
User =
|
|
65
|
+
User = tslib_1.__decorate([
|
|
66
66
|
(0, repository_1.model)({
|
|
67
67
|
settings: {
|
|
68
68
|
strict: false,
|
|
69
69
|
},
|
|
70
70
|
}),
|
|
71
|
-
|
|
71
|
+
tslib_1.__metadata("design:paramtypes", [Object])
|
|
72
72
|
], User);
|
|
73
73
|
exports.User = User;
|
|
74
74
|
//# sourceMappingURL=user.model.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user.model.js","sourceRoot":"","sources":["../../src/models/user.model.ts"],"names":[],"mappings":";AAAA,
|
|
1
|
+
{"version":3,"file":"user.model.js","sourceRoot":"","sources":["../../src/models/user.model.ts"],"names":[],"mappings":";AAAA,2EAA2E;AAC3E,0DAA0D;AAC1D,+CAA+C;AAC/C,gEAAgE;;;;AAEhE,qDAA8E;AAC9E,6CAAkC;AAClC,qEAAyD;AAOzD,IAAa,IAAI,GAAjB,MAAa,IAAK,SAAQ,mBAAM;IAkD9B,YAAY,IAAoB;QAC9B,KAAK,CAAC,IAAI,CAAC,CAAC;IACd,CAAC;CACF,CAAA;AA7CC;IANC,IAAA,qBAAQ,EAAC;QACR,IAAI,EAAE,QAAQ;QACd,EAAE,EAAE,CAAC;QACL,SAAS,EAAE,KAAK;QAChB,UAAU,EAAE,IAAI;KACjB,CAAC;;gCACS;AAKX;IAHC,IAAA,qBAAQ,EAAC;QACR,IAAI,EAAE,QAAQ;KACf,CAAC;;mCACa;AAMf;IAHC,IAAA,qBAAQ,EAAC;QACR,IAAI,EAAE,QAAQ;KACf,CAAC;;sCACgB;AAOlB;IAJC,IAAA,qBAAQ,EAAC;QACR,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;KACf,CAAC;;mCACY;AAKd;IAHC,IAAA,qBAAQ,EAAC;QACR,IAAI,EAAE,SAAS;KAChB,CAAC;;2CACsB;AAKxB;IAHC,IAAA,qBAAQ,EAAC;QACR,IAAI,EAAE,QAAQ;KACf,CAAC;;+CACyB;AAG3B;IADC,IAAA,mBAAM,EAAC,GAAG,EAAE,CAAC,wCAAe,CAAC;sCACb,wCAAe;6CAAC;AAGjC;IADC,IAAA,oBAAO,EAAC,GAAG,EAAE,CAAC,iBAAI,EAAE,EAAC,KAAK,EAAE,SAAS,EAAC,CAAC;;mCAC1B;AA1CH,IAAI;IALhB,IAAA,kBAAK,EAAC;QACL,QAAQ,EAAE;YACR,MAAM,EAAE,KAAK;SACd;KACF,CAAC;;GACW,IAAI,CAqDhB;AArDY,oBAAI"}
|
package/dist/observers/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
// Copyright IBM Corp. 2020. All Rights Reserved.
|
|
2
|
+
// Copyright IBM Corp. and LoopBack contributors 2020. All Rights Reserved.
|
|
3
3
|
// Node module: @loopback/example-access-control-migration
|
|
4
4
|
// This file is licensed under the MIT License.
|
|
5
5
|
// License text available at https://opensource.org/licenses/MIT
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
7
|
const tslib_1 = require("tslib");
|
|
8
|
-
|
|
8
|
+
tslib_1.__exportStar(require("./sample.observer"), exports);
|
|
9
9
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/observers/index.ts"],"names":[],"mappings":";AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/observers/index.ts"],"names":[],"mappings":";AAAA,2EAA2E;AAC3E,0DAA0D;AAC1D,+CAA+C;AAC/C,gEAAgE;;;AAEhE,4DAAkC"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { Application,
|
|
2
|
-
LifeCycleObserver } from '@loopback/core';
|
|
1
|
+
import { Application, LifeCycleObserver } from '@loopback/core';
|
|
3
2
|
import { ProjectRepository } from '../repositories/project.repository';
|
|
4
3
|
import { TeamRepository } from '../repositories/team.repository';
|
|
5
4
|
import { UserRepository } from '../repositories/user.repository';
|