@tomei/sso 0.37.4 → 0.38.1
Sign up to get free protection for your applications and to get access to all the features.
- package/__tests__/unit/components/group-object-privilege/group-object-privilege.spec.ts +4 -4
- package/__tests__/unit/components/group-privilege/group-privilege.spec.ts +3 -3
- package/__tests__/unit/components/user-object-privilege/user-object-privilege.spec.ts +3 -3
- package/__tests__/unit/components/user-privilege/user-privilege.spec.ts +3 -3
- package/dist/__tests__/unit/components/group-object-privilege/group-object-privilege.spec.js +4 -4
- package/dist/__tests__/unit/components/group-object-privilege/group-object-privilege.spec.js.map +1 -1
- package/dist/__tests__/unit/components/group-privilege/group-privilege.spec.js +3 -3
- package/dist/__tests__/unit/components/group-privilege/group-privilege.spec.js.map +1 -1
- package/dist/__tests__/unit/components/user-object-privilege/user-object-privilege.spec.js +3 -3
- package/dist/__tests__/unit/components/user-object-privilege/user-object-privilege.spec.js.map +1 -1
- package/dist/__tests__/unit/components/user-privilege/user-privilege.spec.js +3 -3
- package/dist/__tests__/unit/components/user-privilege/user-privilege.spec.js.map +1 -1
- package/dist/src/components/group/group.d.ts +24 -12
- package/dist/src/components/group/group.js +194 -42
- package/dist/src/components/group/group.js.map +1 -1
- package/dist/src/components/group-object-privilege/group-object-privilege.d.ts +1 -1
- package/dist/src/components/group-object-privilege/group-object-privilege.js +7 -7
- package/dist/src/components/group-object-privilege/group-object-privilege.js.map +1 -1
- package/dist/src/components/group-privilege/group-privilege.d.ts +1 -1
- package/dist/src/components/group-privilege/group-privilege.js +2 -2
- package/dist/src/components/group-privilege/group-privilege.js.map +1 -1
- package/dist/src/components/group-privilege/group-privilege.repository.d.ts +1 -1
- package/dist/src/components/group-privilege/group-privilege.repository.js +11 -3
- package/dist/src/components/group-privilege/group-privilege.repository.js.map +1 -1
- package/dist/src/components/login-user/login-user.js.map +1 -1
- package/dist/src/components/login-user/user.js +2 -2
- package/dist/src/components/login-user/user.js.map +1 -1
- package/dist/src/components/system/system.js +1 -1
- package/dist/src/components/system/system.js.map +1 -1
- package/dist/src/components/system-privilege/system-privilege.d.ts +4 -3
- package/dist/src/components/system-privilege/system-privilege.js +18 -11
- package/dist/src/components/system-privilege/system-privilege.js.map +1 -1
- package/dist/src/components/user-group/user-group.js +1 -1
- package/dist/src/components/user-group/user-group.js.map +1 -1
- package/dist/src/components/user-object-privilege/user-object-privilege.d.ts +1 -1
- package/dist/src/components/user-object-privilege/user-object-privilege.js +1 -1
- package/dist/src/components/user-object-privilege/user-object-privilege.js.map +1 -1
- package/dist/src/components/user-privilege/user-privilege.d.ts +1 -1
- package/dist/src/components/user-privilege/user-privilege.js +1 -1
- package/dist/src/components/user-privilege/user-privilege.js.map +1 -1
- package/dist/src/interfaces/group-object-privilege.interface.d.ts +1 -1
- package/dist/src/interfaces/group-privilege.interface.d.ts +1 -1
- package/dist/src/interfaces/group.interface.d.ts +1 -0
- package/dist/src/interfaces/system-privilege.interface.d.ts +1 -0
- package/dist/src/interfaces/user-object-privilege.interface.d.ts +1 -1
- package/dist/src/interfaces/user-privilege.interface.d.ts +1 -1
- package/dist/src/models/group-object-privilege.entity.d.ts +1 -1
- package/dist/src/models/group-object-privilege.entity.js +1 -1
- package/dist/src/models/group-object-privilege.entity.js.map +1 -1
- package/dist/src/models/group-privilege.entity.d.ts +1 -1
- package/dist/src/models/group-privilege.entity.js +1 -1
- package/dist/src/models/group-privilege.entity.js.map +1 -1
- package/dist/src/models/group.entity.d.ts +1 -0
- package/dist/src/models/group.entity.js +7 -0
- package/dist/src/models/group.entity.js.map +1 -1
- package/dist/src/models/system-privilege.entity.d.ts +1 -0
- package/dist/src/models/system-privilege.entity.js +8 -0
- package/dist/src/models/system-privilege.entity.js.map +1 -1
- package/dist/src/models/user-object-privilege.entity.d.ts +1 -1
- package/dist/src/models/user-object-privilege.entity.js +1 -1
- package/dist/src/models/user-object-privilege.entity.js.map +1 -1
- package/dist/src/models/user-privilege.entity.d.ts +1 -1
- package/dist/src/models/user-privilege.entity.js +1 -1
- package/dist/src/models/user-privilege.entity.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/migrations/20240527064926-create-system-privilege-table.js +66 -62
- package/migrations/20240527065342-create-group-table.js +4 -0
- package/migrations/20240528032229-user-privilege-table.js +2 -2
- package/migrations/20240528063003-create-group-privilege-table.js +12 -2
- package/migrations/20240528063051-create-group-object-privilege-table.js +2 -2
- package/migrations/20240528063107-create-user-object-privilege-table.js +2 -2
- package/package.json +8 -8
- package/src/components/group/group.ts +231 -60
- package/src/components/group-object-privilege/group-object-privilege.ts +9 -9
- package/src/components/group-privilege/group-privilege.repository.ts +16 -3
- package/src/components/group-privilege/group-privilege.ts +3 -3
- package/src/components/login-user/login-user.ts +0 -58
- package/src/components/login-user/user.ts +2 -4
- package/src/components/system/system.ts +1 -1
- package/src/components/system-privilege/system-privilege.ts +20 -12
- package/src/components/user-group/user-group.ts +1 -1
- package/src/components/user-object-privilege/user-object-privilege.ts +2 -2
- package/src/components/user-privilege/user-privilege.ts +2 -2
- package/src/interfaces/group-object-privilege.interface.ts +1 -1
- package/src/interfaces/group-privilege.interface.ts +1 -1
- package/src/interfaces/group.interface.ts +1 -0
- package/src/interfaces/system-privilege.interface.ts +1 -0
- package/src/interfaces/user-object-privilege.interface.ts +1 -1
- package/src/interfaces/user-privilege.interface.ts +1 -1
- package/src/models/group-object-privilege.entity.ts +1 -1
- package/src/models/group-privilege.entity.ts +1 -1
- package/src/models/group.entity.ts +6 -0
- package/src/models/system-privilege.entity.ts +7 -0
- package/src/models/user-object-privilege.entity.ts +1 -1
- package/src/models/user-privilege.entity.ts +1 -1
@@ -1,67 +1,71 @@
|
|
1
1
|
'use strict';
|
2
2
|
|
3
|
-
|
4
3
|
module.exports = {
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
4
|
+
up: async (queryInterface, Sequelize) => {
|
5
|
+
queryInterface.createTable('sso_SystemPrivilege', {
|
6
|
+
SystemPrivilegeId: {
|
7
|
+
primaryKey: true,
|
8
|
+
type: Sequelize.STRING(30),
|
9
|
+
allowNull: false,
|
10
|
+
},
|
11
|
+
PrivilegeCode: {
|
12
|
+
type: Sequelize.STRING(50),
|
13
|
+
allowNull: false,
|
14
|
+
},
|
15
|
+
SystemCode: {
|
16
|
+
type: Sequelize.STRING(10),
|
17
|
+
allowNull: false,
|
18
|
+
references: {
|
19
|
+
model: 'sso_System',
|
20
|
+
key: 'SystemCode',
|
21
|
+
},
|
22
|
+
onDelete: 'CASCADE',
|
23
|
+
onUpdate: 'CASCADE',
|
24
|
+
},
|
25
|
+
Description: {
|
26
|
+
type: Sequelize.STRING(3000),
|
27
|
+
},
|
28
|
+
Status: {
|
29
|
+
type: Sequelize.STRING(10),
|
30
|
+
allowNull: false,
|
31
|
+
defaultValue: 'Active',
|
32
|
+
},
|
33
|
+
CreatedAt: {
|
34
|
+
allowNull: false,
|
35
|
+
defaultValue: Sequelize.literal('CURRENT_TIMESTAMP(3)'),
|
36
|
+
type: Sequelize.DATE,
|
37
|
+
},
|
38
|
+
CreatedById: {
|
39
|
+
type: Sequelize.INTEGER,
|
40
|
+
allowNull: true,
|
41
|
+
references: {
|
42
|
+
model: 'sso_User',
|
43
|
+
key: 'UserId',
|
44
|
+
},
|
45
|
+
onDelete: 'CASCADE',
|
46
|
+
onUpdate: 'CASCADE',
|
47
|
+
},
|
48
|
+
UpdatedAt: {
|
49
|
+
allowNull: false,
|
50
|
+
defaultValue: Sequelize.literal(
|
51
|
+
'CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)',
|
52
|
+
),
|
53
|
+
type: Sequelize.DATE,
|
54
|
+
},
|
55
|
+
UpdatedById: {
|
56
|
+
type: Sequelize.INTEGER,
|
57
|
+
allowNull: true,
|
58
|
+
references: {
|
59
|
+
model: 'sso_User',
|
60
|
+
key: 'UserId',
|
61
|
+
},
|
62
|
+
onDelete: 'CASCADE',
|
63
|
+
onUpdate: 'CASCADE',
|
64
|
+
},
|
65
|
+
});
|
66
|
+
},
|
63
67
|
|
64
|
-
|
65
|
-
|
66
|
-
|
68
|
+
down: async (queryInterface) => {
|
69
|
+
await queryInterface.dropTable('sso_SystemPrivilege');
|
70
|
+
},
|
67
71
|
};
|
@@ -20,12 +20,12 @@ module.exports = {
|
|
20
20
|
onDelete: 'CASCADE',
|
21
21
|
onUpdate: 'CASCADE',
|
22
22
|
},
|
23
|
-
|
23
|
+
SystemPrivilegeId: {
|
24
24
|
type: Sequelize.STRING(10),
|
25
25
|
allowNull: false,
|
26
26
|
references: {
|
27
27
|
model: 'sso_SystemPrivilege',
|
28
|
-
key: '
|
28
|
+
key: 'SystemPrivilegeId',
|
29
29
|
},
|
30
30
|
onDelete: 'CASCADE',
|
31
31
|
onUpdate: 'CASCADE',
|
@@ -20,12 +20,22 @@ module.exports = {
|
|
20
20
|
onDelete: 'CASCADE',
|
21
21
|
onUpdate: 'CASCADE',
|
22
22
|
},
|
23
|
-
|
23
|
+
SystemPrivilegeId: {
|
24
24
|
type: Sequelize.STRING(10),
|
25
25
|
allowNull: false,
|
26
26
|
references: {
|
27
27
|
model: 'sso_SystemPrivilege',
|
28
|
-
key: '
|
28
|
+
key: 'SystemPrivilegeId',
|
29
|
+
},
|
30
|
+
onDelete: 'CASCADE',
|
31
|
+
onUpdate: 'CASCADE',
|
32
|
+
},
|
33
|
+
SystemCode: {
|
34
|
+
type: Sequelize.STRING(10),
|
35
|
+
allowNull: false,
|
36
|
+
references: {
|
37
|
+
model: 'sso_System',
|
38
|
+
key: 'SystemCode',
|
29
39
|
},
|
30
40
|
onDelete: 'CASCADE',
|
31
41
|
onUpdate: 'CASCADE',
|
@@ -20,12 +20,12 @@ module.exports = {
|
|
20
20
|
onDelete: 'CASCADE',
|
21
21
|
onUpdate: 'CASCADE',
|
22
22
|
},
|
23
|
-
|
23
|
+
SystemPrivilegeId: {
|
24
24
|
type: Sequelize.STRING(10),
|
25
25
|
allowNull: false,
|
26
26
|
references: {
|
27
27
|
model: 'sso_SystemPrivilege',
|
28
|
-
key: '
|
28
|
+
key: 'SystemPrivilegeId',
|
29
29
|
},
|
30
30
|
onDelete: 'CASCADE',
|
31
31
|
onUpdate: 'CASCADE',
|
@@ -20,12 +20,12 @@ module.exports = {
|
|
20
20
|
onDelete: 'CASCADE',
|
21
21
|
onUpdate: 'CASCADE',
|
22
22
|
},
|
23
|
-
|
23
|
+
SystemPrivilegeId: {
|
24
24
|
type: Sequelize.STRING(10),
|
25
25
|
allowNull: false,
|
26
26
|
references: {
|
27
27
|
model: 'sso_SystemPrivilege',
|
28
|
-
key: '
|
28
|
+
key: 'SystemPrivilegeId',
|
29
29
|
},
|
30
30
|
onDelete: 'CASCADE',
|
31
31
|
onUpdate: 'CASCADE',
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@tomei/sso",
|
3
|
-
"version": "0.
|
3
|
+
"version": "0.38.1",
|
4
4
|
"description": "Tomei SSO Package",
|
5
5
|
"main": "dist/index.js",
|
6
6
|
"scripts": {
|
@@ -35,6 +35,7 @@
|
|
35
35
|
"@types/redis": "^4.0.11",
|
36
36
|
"@types/validator": "^13.11.1",
|
37
37
|
"@typescript-eslint/eslint-plugin": "^5.33.0",
|
38
|
+
"@typescript-eslint/parser": "^5.0.0",
|
38
39
|
"dotenv": "^16.1.4",
|
39
40
|
"eslint": "^8.40.0",
|
40
41
|
"eslint-config-prettier": "^8.5.0",
|
@@ -59,19 +60,18 @@
|
|
59
60
|
"access": "public"
|
60
61
|
},
|
61
62
|
"peerDependencies": {
|
62
|
-
"@tomei/activity-history": "^0.2.
|
63
|
-
"@tomei/config": "^0.3.
|
64
|
-
"@tomei/general": "^0.
|
65
|
-
"@tomei/mailer": "^0.5.
|
66
|
-
"@types/jest": "^29.5.2",
|
63
|
+
"@tomei/activity-history": "^0.2.18",
|
64
|
+
"@tomei/config": "^0.3.11",
|
65
|
+
"@tomei/general": "^0.14.2",
|
66
|
+
"@tomei/mailer": "^0.5.14",
|
67
67
|
"argon2": "^0.30.3",
|
68
68
|
"cls-hooked": "^4.2.2",
|
69
69
|
"cuid": "^3.0.0",
|
70
70
|
"nodemailer": "^6.9.3",
|
71
71
|
"redis": "^4.6.7",
|
72
72
|
"reflect-metadata": "^0.1.13",
|
73
|
-
"sequelize": "^6.
|
74
|
-
"sequelize-typescript": "^2.1.
|
73
|
+
"sequelize": "^6.37.3",
|
74
|
+
"sequelize-typescript": "^2.1.6",
|
75
75
|
"speakeasy": "^2.0.0",
|
76
76
|
"uuid": "^10.0.0"
|
77
77
|
},
|