@spinajs/rbac-http 2.0.19 → 2.0.23
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.
|
@@ -1,82 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
// const query = User.all()
|
|
20
|
-
// .whereNull('DeletedAt')
|
|
21
|
-
// .skip((page - 1) * perPage)
|
|
22
|
-
// .take(perPage)
|
|
23
|
-
// .order(order, orderDirection)
|
|
24
|
-
// .populate('Metadata');
|
|
25
|
-
// const countQuery = User.query().select(new RawQuery('count(*) as count')).whereNull('DeletedAt');
|
|
26
|
-
// if (search) {
|
|
27
|
-
// const searchFunc = function () {
|
|
28
|
-
// this.where('Email', 'like', `%${search}%`);
|
|
29
|
-
// this.orWhere('NiceName', 'like', `%${search}%`);
|
|
30
|
-
// };
|
|
31
|
-
// query.where(searchFunc);
|
|
32
|
-
// countQuery.where(searchFunc);
|
|
33
|
-
// }
|
|
34
|
-
// const r = await query;
|
|
35
|
-
// const c = await countQuery.asRaw<Array<{ count: number }>>();
|
|
36
|
-
// if (r.length === 0) {
|
|
37
|
-
// return new NotFound('no users met search criteria');
|
|
38
|
-
// }
|
|
39
|
-
// return new Ok(
|
|
40
|
-
// this.DataTransformer.transform(
|
|
41
|
-
// {
|
|
42
|
-
// Data: r.map((u) => u.dehydrate()),
|
|
43
|
-
// Total: c[0].count,
|
|
44
|
-
// },
|
|
45
|
-
// request,
|
|
46
|
-
// ),
|
|
47
|
-
// );
|
|
48
|
-
// }
|
|
49
|
-
// // @Post('/')
|
|
50
|
-
// // public async addUser(@Body() user: UserDto) {
|
|
51
|
-
// // const password = this._container.resolve<PasswordProvider>(PasswordProvider);
|
|
52
|
-
// // if (user.Password !== user.ConfirmPassword) {
|
|
53
|
-
// // throw new InvalidArgument('password does not match');
|
|
54
|
-
// // }
|
|
55
|
-
// // let hashedPassword = '';
|
|
56
|
-
// // let userPassword = user.Password;
|
|
57
|
-
// // if (!userPassword) {
|
|
58
|
-
// // userPassword = password.generate();
|
|
59
|
-
// // }
|
|
60
|
-
// // hashedPassword = await password.hash(userPassword);
|
|
61
|
-
// // const entity = new User({
|
|
62
|
-
// // Email: user.Email,
|
|
63
|
-
// // Login: user.Login,
|
|
64
|
-
// // NiceName: user.NiceName,
|
|
65
|
-
// // Password: hashedPassword,
|
|
66
|
-
// // CreatedAt: DateTime.now(),
|
|
67
|
-
// // Role: user.Role,
|
|
68
|
-
// // });
|
|
69
|
-
// // await entity.insert();
|
|
70
|
-
// // return new Ok({ Id: entity.Id });
|
|
71
|
-
// // }
|
|
72
|
-
// // @Patch('role/add/:login/:role')
|
|
73
|
-
// // @Permission('updateAny')
|
|
74
|
-
// // public async addRole(@Param() login: string, @Param() role: string) {}
|
|
75
|
-
// // @Patch('role/revoke/:login/:role')
|
|
76
|
-
// // @Permission('updateAny')
|
|
77
|
-
// // public async revokeRole(@Param() login: string, @Param() role: string) {}
|
|
78
|
-
// // @Patch('update/:login')
|
|
79
|
-
// // @Permission('updateAny')
|
|
80
|
-
// // public async update(@Param() login: string, @Body() data: any) {}
|
|
81
|
-
// }
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.UsersController = void 0;
|
|
10
|
+
const http_1 = require("@spinajs/http");
|
|
11
|
+
const decorators_1 = require("./../decorators");
|
|
12
|
+
let UsersController = class UsersController extends http_1.BaseController {
|
|
13
|
+
};
|
|
14
|
+
UsersController = __decorate([
|
|
15
|
+
(0, decorators_1.Resource)('user'),
|
|
16
|
+
(0, http_1.BasePath)('user')
|
|
17
|
+
], UsersController);
|
|
18
|
+
exports.UsersController = UsersController;
|
|
82
19
|
//# sourceMappingURL=UserAdminController.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserAdminController.js","sourceRoot":"","sources":["../../src/controllers/UserAdminController.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"UserAdminController.js","sourceRoot":"","sources":["../../src/controllers/UserAdminController.ts"],"names":[],"mappings":";;;;;;;;;AAAA,wCAAyD;AACzD,gDAA2C;AAI3C,IAAa,eAAe,GAA5B,MAAa,eAAgB,SAAQ,qBAAc;CAuElD,CAAA;AAvEY,eAAe;IAF3B,IAAA,qBAAQ,EAAC,MAAM,CAAC;IAChB,IAAA,eAAQ,EAAC,MAAM,CAAC;GACJ,eAAe,CAuE3B;AAvEY,0CAAe"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spinajs/rbac-http",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.23",
|
|
4
4
|
"description": "HTTP API for user session & permissions",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"private": false,
|
|
@@ -44,14 +44,14 @@
|
|
|
44
44
|
"@spinajs/http": "^2.0.19",
|
|
45
45
|
"@spinajs/log": "^2.0.19",
|
|
46
46
|
"@spinajs/orm": "^2.0.19",
|
|
47
|
-
"@spinajs/orm-http": "^2.0.
|
|
48
|
-
"@spinajs/rbac": "^2.0.
|
|
47
|
+
"@spinajs/orm-http": "^2.0.23",
|
|
48
|
+
"@spinajs/rbac": "^2.0.21",
|
|
49
49
|
"@spinajs/reflection": "^2.0.19",
|
|
50
50
|
"accesscontrol": "^2.2.1",
|
|
51
51
|
"luxon": "^2.4.0"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
|
-
"@spinajs/orm-sqlite": "^2.0.
|
|
54
|
+
"@spinajs/orm-sqlite": "^2.0.21"
|
|
55
55
|
},
|
|
56
|
-
"gitHead": "
|
|
56
|
+
"gitHead": "0bb33fb5619cfb6974496dbb8ba348c6175e40dc"
|
|
57
57
|
}
|