@tomei/sso 0.65.1-test.1 → 0.65.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/.gitlab-ci.yml +33 -214
- package/__tests__/unit/components/group/group.spec.ts +0 -6
- package/__tests__/unit/components/group-reporting-user/group-reporting-user.spec.ts +1 -9
- package/__tests__/unit/components/login-user/login.spec.ts +5 -1199
- package/__tests__/unit/components/login-user/password-expiry.spec.ts +87 -0
- package/__tests__/unit/components/system/system.spec.ts +0 -1
- package/dist/__tests__/unit/components/group/group.spec.js +0 -4
- package/dist/__tests__/unit/components/group/group.spec.js.map +1 -1
- package/dist/__tests__/unit/components/group-reporting-user/group-reporting-user.spec.js +1 -9
- package/dist/__tests__/unit/components/group-reporting-user/group-reporting-user.spec.js.map +1 -1
- package/dist/__tests__/unit/components/login-user/login.spec.js +0 -703
- package/dist/__tests__/unit/components/login-user/login.spec.js.map +1 -1
- package/dist/__tests__/unit/components/login-user/password-expiry.spec.js +86 -0
- package/dist/__tests__/unit/components/login-user/password-expiry.spec.js.map +1 -0
- package/dist/__tests__/unit/components/system/system.spec.js +0 -1
- package/dist/__tests__/unit/components/system/system.spec.js.map +1 -1
- package/dist/src/components/login-user/user.d.ts +5 -0
- package/dist/src/components/login-user/user.js +44 -0
- package/dist/src/components/login-user/user.js.map +1 -1
- package/dist/src/components/user-password-history/user-password-history.d.ts +1 -0
- package/dist/src/components/user-password-history/user-password-history.js +41 -2
- package/dist/src/components/user-password-history/user-password-history.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/jest.config.js +0 -2
- package/package.json +2 -2
- package/src/components/login-user/user.ts +78 -0
- package/src/components/user-password-history/user-password-history.ts +57 -6
- package/__tests__/unit/components/api-key/api-key.spec.ts +0 -201
- package/__tests__/unit/components/user-password-history/user-password-history.spec.ts +0 -165
- package/__tests__/unit/components/user-reporting-hierarchy/user-reporting-hierarchy.spec.ts +0 -233
- package/coverage/cobertura-coverage.xml +0 -6837
- package/coverage/test-report.xml +0 -161
- package/dist/__tests__/unit/components/api-key/api-key.spec.js +0 -158
- package/dist/__tests__/unit/components/api-key/api-key.spec.js.map +0 -1
- package/dist/__tests__/unit/components/user-password-history/user-password-history.spec.d.ts +0 -1
- package/dist/__tests__/unit/components/user-password-history/user-password-history.spec.js +0 -138
- package/dist/__tests__/unit/components/user-password-history/user-password-history.spec.js.map +0 -1
- package/dist/__tests__/unit/components/user-reporting-hierarchy/user-reporting-hierarchy.spec.d.ts +0 -1
- package/dist/__tests__/unit/components/user-reporting-hierarchy/user-reporting-hierarchy.spec.js +0 -182
- package/dist/__tests__/unit/components/user-reporting-hierarchy/user-reporting-hierarchy.spec.js.map +0 -1
- package/migrations/20250805085707-add-bulk-approval-code-to-sso-user.js +0 -29
- /package/dist/__tests__/unit/components/{api-key/api-key.spec.d.ts → login-user/password-expiry.spec.d.ts} +0 -0
package/dist/__tests__/unit/components/user-reporting-hierarchy/user-reporting-hierarchy.spec.js
DELETED
|
@@ -1,182 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
const login_user_1 = require("../../../../src/components/login-user/login-user");
|
|
13
|
-
const user_1 = require("../../../../src/components/login-user/user");
|
|
14
|
-
const user_reporting_hierarchy_1 = require("../../../../src/components/user-reporting-hierarchy/user-reporting-hierarchy");
|
|
15
|
-
const user_reporting_hierarchy_repository_1 = require("../../../../src/components/user-reporting-hierarchy/user-reporting-hierarchy.repository");
|
|
16
|
-
const config_1 = require("@tomei/config");
|
|
17
|
-
const activity_history_1 = require("@tomei/activity-history");
|
|
18
|
-
describe('UserReportingHierarchy', () => {
|
|
19
|
-
const loginUser = new login_user_1.LoginUser.prototype.constructor();
|
|
20
|
-
loginUser.ObjectId = '1';
|
|
21
|
-
loginUser.UserId = 1;
|
|
22
|
-
const hierarchyData = {
|
|
23
|
-
UserReportingHierarchyId: 1,
|
|
24
|
-
ReportingUserId: 10,
|
|
25
|
-
UserId: 20,
|
|
26
|
-
Rank: 1,
|
|
27
|
-
Status: 'Active',
|
|
28
|
-
CreatedById: 1,
|
|
29
|
-
CreatedAt: new Date('2024-01-01'),
|
|
30
|
-
UpdatedById: 1,
|
|
31
|
-
UpdatedAt: new Date('2024-01-01'),
|
|
32
|
-
get: (opts) => ({
|
|
33
|
-
UserReportingHierarchyId: 1,
|
|
34
|
-
ReportingUserId: 10,
|
|
35
|
-
UserId: 20,
|
|
36
|
-
Rank: 1,
|
|
37
|
-
Status: 'Active',
|
|
38
|
-
CreatedById: 1,
|
|
39
|
-
CreatedAt: new Date('2024-01-01'),
|
|
40
|
-
UpdatedById: 1,
|
|
41
|
-
UpdatedAt: new Date('2024-01-01'),
|
|
42
|
-
}),
|
|
43
|
-
};
|
|
44
|
-
afterEach(() => {
|
|
45
|
-
jest.clearAllMocks();
|
|
46
|
-
});
|
|
47
|
-
beforeEach(() => {
|
|
48
|
-
jest
|
|
49
|
-
.spyOn(config_1.ApplicationConfig, 'getComponentConfigValue')
|
|
50
|
-
.mockReturnValue('TST');
|
|
51
|
-
jest
|
|
52
|
-
.spyOn(activity_history_1.Activity.prototype, 'create')
|
|
53
|
-
.mockResolvedValue(undefined);
|
|
54
|
-
jest
|
|
55
|
-
.spyOn(login_user_1.LoginUser.prototype, 'checkPrivileges')
|
|
56
|
-
.mockResolvedValue(true);
|
|
57
|
-
});
|
|
58
|
-
describe('init', () => {
|
|
59
|
-
it('should return a new instance when no id is provided', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
60
|
-
const result = yield user_reporting_hierarchy_1.UserReportingHierarchy.init();
|
|
61
|
-
expect(result).toBeInstanceOf(user_reporting_hierarchy_1.UserReportingHierarchy);
|
|
62
|
-
expect(result.UserReportingHierarchyId).toBeNaN();
|
|
63
|
-
}));
|
|
64
|
-
it('should initialize with valid id', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
65
|
-
jest
|
|
66
|
-
.spyOn(user_reporting_hierarchy_repository_1.UserReportingHierarchyRepository.prototype, 'findByPk')
|
|
67
|
-
.mockResolvedValueOnce(hierarchyData);
|
|
68
|
-
const result = yield user_reporting_hierarchy_1.UserReportingHierarchy.init(1);
|
|
69
|
-
expect(result).toBeInstanceOf(user_reporting_hierarchy_1.UserReportingHierarchy);
|
|
70
|
-
expect(result.ReportingUserId).toBe(10);
|
|
71
|
-
expect(result.UserId).toBe(20);
|
|
72
|
-
expect(result.Rank).toBe(1);
|
|
73
|
-
}));
|
|
74
|
-
it('should throw ClassError when id is not found', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
75
|
-
jest
|
|
76
|
-
.spyOn(user_reporting_hierarchy_repository_1.UserReportingHierarchyRepository.prototype, 'findByPk')
|
|
77
|
-
.mockResolvedValueOnce(null);
|
|
78
|
-
yield expect(user_reporting_hierarchy_1.UserReportingHierarchy.init(999)).rejects.toThrow('UserReportingHierarchy not found');
|
|
79
|
-
}));
|
|
80
|
-
});
|
|
81
|
-
describe('createUserReportingHierarchy', () => {
|
|
82
|
-
it('should throw when user lacks USER_REPORTING_HIERARCHY_CREATE privilege', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
83
|
-
jest
|
|
84
|
-
.spyOn(login_user_1.LoginUser.prototype, 'checkPrivileges')
|
|
85
|
-
.mockResolvedValueOnce(false);
|
|
86
|
-
jest.spyOn(user_1.User, 'init').mockResolvedValue(loginUser);
|
|
87
|
-
const hierarchy = yield user_reporting_hierarchy_1.UserReportingHierarchy.init();
|
|
88
|
-
yield expect(hierarchy.createUserReportingHierarchy(loginUser, null, 10, 20, 1, 'Active')).rejects.toThrow('User does not have the required privileges');
|
|
89
|
-
}));
|
|
90
|
-
it('should throw when relationship already exists', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
91
|
-
jest.spyOn(user_1.User, 'init').mockResolvedValue(loginUser);
|
|
92
|
-
jest
|
|
93
|
-
.spyOn(user_reporting_hierarchy_repository_1.UserReportingHierarchyRepository.prototype, 'findOne')
|
|
94
|
-
.mockResolvedValueOnce(hierarchyData);
|
|
95
|
-
const hierarchy = yield user_reporting_hierarchy_1.UserReportingHierarchy.init();
|
|
96
|
-
yield expect(hierarchy.createUserReportingHierarchy(loginUser, null, 10, 20, 1, 'Active')).rejects.toThrow('Relationship already exists');
|
|
97
|
-
}));
|
|
98
|
-
it('should throw when rank already exists', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
99
|
-
jest.spyOn(user_1.User, 'init').mockResolvedValue(loginUser);
|
|
100
|
-
jest
|
|
101
|
-
.spyOn(user_reporting_hierarchy_repository_1.UserReportingHierarchyRepository.prototype, 'findOne')
|
|
102
|
-
.mockResolvedValueOnce(null)
|
|
103
|
-
.mockResolvedValueOnce(hierarchyData);
|
|
104
|
-
const hierarchy = yield user_reporting_hierarchy_1.UserReportingHierarchy.init();
|
|
105
|
-
yield expect(hierarchy.createUserReportingHierarchy(loginUser, null, 10, 20, 1, 'Active')).rejects.toThrow('Rank already exists');
|
|
106
|
-
}));
|
|
107
|
-
it('should throw when previous rank is not yet assigned (rank > 1)', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
108
|
-
jest.spyOn(user_1.User, 'init').mockResolvedValue(loginUser);
|
|
109
|
-
jest
|
|
110
|
-
.spyOn(user_reporting_hierarchy_repository_1.UserReportingHierarchyRepository.prototype, 'findOne')
|
|
111
|
-
.mockResolvedValueOnce(null)
|
|
112
|
-
.mockResolvedValueOnce(null)
|
|
113
|
-
.mockResolvedValueOnce(null);
|
|
114
|
-
const hierarchy = yield user_reporting_hierarchy_1.UserReportingHierarchy.init();
|
|
115
|
-
yield expect(hierarchy.createUserReportingHierarchy(loginUser, null, 10, 20, 2, 'Active')).rejects.toThrow('Rank before the new rank is not yet assigned to the user');
|
|
116
|
-
}));
|
|
117
|
-
it('should create hierarchy successfully', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
118
|
-
jest.spyOn(user_1.User, 'init').mockResolvedValue(loginUser);
|
|
119
|
-
jest
|
|
120
|
-
.spyOn(user_reporting_hierarchy_repository_1.UserReportingHierarchyRepository.prototype, 'findOne')
|
|
121
|
-
.mockResolvedValueOnce(null)
|
|
122
|
-
.mockResolvedValueOnce(null);
|
|
123
|
-
const createSpy = jest
|
|
124
|
-
.spyOn(user_reporting_hierarchy_repository_1.UserReportingHierarchyRepository.prototype, 'create')
|
|
125
|
-
.mockResolvedValueOnce(hierarchyData);
|
|
126
|
-
const hierarchy = yield user_reporting_hierarchy_1.UserReportingHierarchy.init();
|
|
127
|
-
const result = yield hierarchy.createUserReportingHierarchy(loginUser, null, 10, 20, 1, 'Active');
|
|
128
|
-
expect(createSpy).toHaveBeenCalledTimes(1);
|
|
129
|
-
expect(result).toBeInstanceOf(user_reporting_hierarchy_1.UserReportingHierarchy);
|
|
130
|
-
}));
|
|
131
|
-
});
|
|
132
|
-
describe('updateUserReportingHierarchy', () => {
|
|
133
|
-
it('should throw when user lacks USER_REPORTING_HIERARCHY_UPDATE privilege', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
134
|
-
jest.spyOn(user_1.User, 'init').mockResolvedValue(loginUser);
|
|
135
|
-
jest
|
|
136
|
-
.spyOn(login_user_1.LoginUser.prototype, 'checkPrivileges')
|
|
137
|
-
.mockResolvedValueOnce(false);
|
|
138
|
-
jest
|
|
139
|
-
.spyOn(user_reporting_hierarchy_repository_1.UserReportingHierarchyRepository.prototype, 'findByPk')
|
|
140
|
-
.mockResolvedValueOnce(hierarchyData);
|
|
141
|
-
const hierarchy = yield user_reporting_hierarchy_1.UserReportingHierarchy.init(1);
|
|
142
|
-
yield expect(hierarchy.updateUserReportingHierarchy(loginUser, null, 10, 20, 1, 'Active')).rejects.toThrow('User does not have the required privileges');
|
|
143
|
-
}));
|
|
144
|
-
it('should update successfully', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
145
|
-
jest.spyOn(user_1.User, 'init').mockResolvedValue(loginUser);
|
|
146
|
-
jest
|
|
147
|
-
.spyOn(user_reporting_hierarchy_repository_1.UserReportingHierarchyRepository.prototype, 'findByPk')
|
|
148
|
-
.mockResolvedValueOnce(hierarchyData);
|
|
149
|
-
jest
|
|
150
|
-
.spyOn(user_reporting_hierarchy_repository_1.UserReportingHierarchyRepository.prototype, 'findOne')
|
|
151
|
-
.mockResolvedValueOnce(null)
|
|
152
|
-
.mockResolvedValueOnce(null);
|
|
153
|
-
const updateSpy = jest
|
|
154
|
-
.spyOn(user_reporting_hierarchy_repository_1.UserReportingHierarchyRepository.prototype, 'update')
|
|
155
|
-
.mockResolvedValueOnce(undefined);
|
|
156
|
-
const hierarchy = yield user_reporting_hierarchy_1.UserReportingHierarchy.init(1);
|
|
157
|
-
const result = yield hierarchy.updateUserReportingHierarchy(loginUser, null, 10, 20, 1, 'Active');
|
|
158
|
-
expect(updateSpy).toHaveBeenCalledTimes(1);
|
|
159
|
-
expect(result).toBeInstanceOf(user_reporting_hierarchy_1.UserReportingHierarchy);
|
|
160
|
-
}));
|
|
161
|
-
});
|
|
162
|
-
describe('removeUserReportingHierarchy', () => {
|
|
163
|
-
it('should throw when user lacks USER_REPORTING_HIERARCHY_REMOVE privilege', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
164
|
-
jest
|
|
165
|
-
.spyOn(login_user_1.LoginUser.prototype, 'checkPrivileges')
|
|
166
|
-
.mockResolvedValueOnce(false);
|
|
167
|
-
yield expect(user_reporting_hierarchy_1.UserReportingHierarchy.removeUserReportingHierarchy(loginUser, null, 1)).rejects.toThrow('Insufficient privileges to remove reporting hierarchy');
|
|
168
|
-
}));
|
|
169
|
-
it('should remove hierarchy successfully', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
170
|
-
jest
|
|
171
|
-
.spyOn(user_reporting_hierarchy_repository_1.UserReportingHierarchyRepository.prototype, 'findByPk')
|
|
172
|
-
.mockResolvedValueOnce(hierarchyData);
|
|
173
|
-
const destroySpy = jest
|
|
174
|
-
.spyOn(user_reporting_hierarchy_repository_1.UserReportingHierarchyRepository.prototype, 'destroy')
|
|
175
|
-
.mockResolvedValueOnce(undefined);
|
|
176
|
-
yield user_reporting_hierarchy_1.UserReportingHierarchy.removeUserReportingHierarchy(loginUser, null, 1);
|
|
177
|
-
expect(destroySpy).toHaveBeenCalledTimes(1);
|
|
178
|
-
expect(destroySpy).toHaveBeenCalledWith(1, null);
|
|
179
|
-
}));
|
|
180
|
-
});
|
|
181
|
-
});
|
|
182
|
-
//# sourceMappingURL=user-reporting-hierarchy.spec.js.map
|
package/dist/__tests__/unit/components/user-reporting-hierarchy/user-reporting-hierarchy.spec.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"user-reporting-hierarchy.spec.js","sourceRoot":"","sources":["../../../../../__tests__/unit/components/user-reporting-hierarchy/user-reporting-hierarchy.spec.ts"],"names":[],"mappings":";;;;;;;;;;;AAEA,iFAA6E;AAC7E,qEAAkE;AAClE,2HAAsH;AACtH,iJAA2I;AAC3I,0CAAkD;AAClD,8DAAmD;AAGnD,QAAQ,CAAC,wBAAwB,EAAE,GAAG,EAAE;IACtC,MAAM,SAAS,GAAG,IAAK,sBAAS,CAAC,SAAiB,CAAC,WAAW,EAAE,CAAC;IACjE,SAAS,CAAC,QAAQ,GAAG,GAAG,CAAC;IACzB,SAAS,CAAC,MAAM,GAAG,CAAC,CAAC;IAErB,MAAM,aAAa,GAAG;QACpB,wBAAwB,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AgC,CAAC,SAAS,EAAE,UAAU,CAAC;iBAC7D,qBAAqB,CAAC,aAAoB,CAAC,CAAC;YAC/C,MAAM,UAAU,GAAG,IAAI;iBACpB,KAAK,CAAC,sEAAgC,CAAC,SAAS,EAAE,SAAS,CAAC;iBAC5D,qBAAqB,CAAC,SAAgB,CAAC,CAAC;YAE3C,MAAM,iDAAsB,CAAC,4BAA4B,CAAC,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;YAE9E,MAAM,CAAC,UAAU,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC;YAC5C,MAAM,CAAC,UAAU,CAAC,CAAC,oBAAoB,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC;QACnD,CAAC,CAAA,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
module.exports = {
|
|
4
|
-
up: async (queryInterface, Sequelize) => {
|
|
5
|
-
const transaction = await queryInterface.sequelize.transaction();
|
|
6
|
-
try {
|
|
7
|
-
await queryInterface.addColumn('sso_User', 'BulkApprovalCode', {
|
|
8
|
-
type: Sequelize.STRING(100),
|
|
9
|
-
allowNull: true,
|
|
10
|
-
});
|
|
11
|
-
|
|
12
|
-
await transaction.commit();
|
|
13
|
-
} catch (error) {
|
|
14
|
-
await transaction.rollback();
|
|
15
|
-
throw error;
|
|
16
|
-
}
|
|
17
|
-
},
|
|
18
|
-
|
|
19
|
-
down: async (queryInterface, Sequelize) => {
|
|
20
|
-
const transaction = await queryInterface.sequelize.transaction();
|
|
21
|
-
try {
|
|
22
|
-
await queryInterface.removeColumn('sso_User', 'BulkApprovalCode');
|
|
23
|
-
await transaction.commit();
|
|
24
|
-
} catch (error) {
|
|
25
|
-
await transaction.rollback();
|
|
26
|
-
throw error;
|
|
27
|
-
}
|
|
28
|
-
},
|
|
29
|
-
};
|
|
File without changes
|