-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
I can't execute all the test in a single call, with it.only works but…
… without it not
- Loading branch information
Showing
3 changed files
with
382 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -56,6 +56,48 @@ export const metadataConfigDisabledUsergroupFix: PermissionFixerMetadataConfig = | |
}, | ||
permissionFixerConfig: configFixUserGroupDisabled, | ||
}; | ||
export const metadataConfigWrongMinimaLUserGroup: PermissionFixerMetadataConfig = { | ||
templates: [templateGroup], | ||
excludedRoles: [], | ||
excludedUsers: [], | ||
excludedRolesByUser: [], | ||
excludedRolesByGroup: [], | ||
excludedRolesByRole: [], | ||
pushProgram: { | ||
id: "IKpEgoQ4S0r", | ||
name: "Event program uid", | ||
}, | ||
minimalGroup: { | ||
id: "IKpEgoQ4S03", | ||
name: "WrongMinimal group uid", | ||
}, | ||
minimalRole: { | ||
id: "IKpEgoQ4S03", | ||
name: "Minimal role uid", | ||
}, | ||
permissionFixerConfig: config, | ||
}; | ||
export const metadataConfigEnabledUsergroupFix: PermissionFixerMetadataConfig = { | ||
templates: [templateGroup], | ||
excludedRoles: [], | ||
excludedUsers: [], | ||
excludedRolesByUser: [], | ||
excludedRolesByGroup: [], | ||
excludedRolesByRole: [], | ||
pushProgram: { | ||
id: "IKpEgoQ4S0r", | ||
name: "Event program uid", | ||
}, | ||
minimalGroup: { | ||
id: "IKpEgoQ4S02", | ||
name: "Minimal group uid", | ||
}, | ||
minimalRole: { | ||
id: "IKpEgoQ4S03", | ||
name: "Minimal role uid", | ||
}, | ||
permissionFixerConfig: config, | ||
}; | ||
|
||
export const metadataConfig: PermissionFixerMetadataConfig = { | ||
templates: [templateGroup], | ||
|
@@ -98,6 +140,75 @@ export const programMetadata: UserMonitoringProgramMetadata = { | |
orgUnitId: "wLoK6XpZq8I", | ||
}; | ||
|
||
export const fakeTemplateUser: PermissionFixerUser = { | ||
//lastUpdated: "2024-09-16T14:51:06.958", | ||
id: "CHbcHcmgoZ7", | ||
//href: "https://server/api/users/CHbcHcmgoZ5", | ||
//created: "2018-05-02T11:33:24.434", | ||
//lastLogin: "2024-09-16T14:51:06.955", | ||
twoFA: false, | ||
invitation: false, | ||
//selfRegistered: false, | ||
firstName: "Fake", | ||
name: "Fake Dummy TEMPLATE", | ||
favorite: false, | ||
//openId: "[email protected]", | ||
displayName: "Fake Dummy TEMPLATE", | ||
externalAuth: false, | ||
externalAccess: false, | ||
surname: "TEMPLATE", | ||
disabled: false, | ||
email: "[email protected]", | ||
username: "TEMPLATE", | ||
lastUpdatedBy: { | ||
displayName: "fake complete name", | ||
name: "fake complete name", | ||
id: "TuqkLj1igOH", | ||
username: "fakeusername", | ||
}, | ||
userCredentials: { | ||
//openId: "[email protected]", | ||
lastLogin: "2024-09-16T14:51:06.955", | ||
invitation: false, | ||
disabled: false, | ||
twoFA: false, | ||
username: "TEMPLATE", | ||
userRoles: [ | ||
{ | ||
id: "IKpEgoQ4S03", | ||
name: "Minimal role uid", | ||
}, | ||
], | ||
//this is a bit different in 2.38.7 | ||
lastUpdated: "", | ||
passwordLastUpdated: "", | ||
selfRegisterd: false, | ||
uid: "", | ||
twoFactorEnabled: false, | ||
}, | ||
createdBy: { | ||
displayName: "fake complete name", | ||
name: "fake complete name", | ||
id: "TuqkLj1igOH", | ||
username: "fakeusername", | ||
}, | ||
userGroups: [ | ||
{ | ||
id: "dhWMtH5yC2h", | ||
name: "userGroup name", | ||
}, | ||
], | ||
userRoles: [ | ||
{ | ||
id: "IKpEgoQ4S03", | ||
name: "Minimal role uid", | ||
}, | ||
], | ||
selftRefistered: false, | ||
phoneNumber: "", | ||
passwordLastUpdated: "", | ||
}; | ||
|
||
export const fakeValidUser: PermissionFixerUser = { | ||
//lastUpdated: "2024-09-16T14:51:06.958", | ||
id: "CHbcHcmgoZ5", | ||
|
@@ -166,7 +277,149 @@ export const fakeValidUser: PermissionFixerUser = { | |
phoneNumber: "", | ||
passwordLastUpdated: "", | ||
}; | ||
|
||
export const fakeInvalidUser: PermissionFixerUser = { | ||
//lastUpdated: "2024-09-16T14:51:06.958", | ||
id: "CHbcHcmgoZ5", | ||
//href: "https://server/api/users/CHbcHcmgoZ5", | ||
//created: "2018-05-02T11:33:24.434", | ||
//lastLogin: "2024-09-16T14:51:06.955", | ||
twoFA: false, | ||
invitation: false, | ||
//selfRegistered: false, | ||
firstName: "Fake", | ||
name: "Fake Dummy", | ||
favorite: false, | ||
//openId: "[email protected]", | ||
displayName: "Fake Dummy", | ||
externalAuth: false, | ||
externalAccess: false, | ||
surname: "Dummy", | ||
disabled: false, | ||
email: "[email protected]", | ||
username: "userusername", | ||
lastUpdatedBy: { | ||
displayName: "fake complete name", | ||
name: "fake complete name", | ||
id: "TuqkLj1igOH", | ||
username: "fakeusername", | ||
}, | ||
userCredentials: { | ||
//openId: "[email protected]", | ||
lastLogin: "2024-09-16T14:51:06.955", | ||
invitation: false, | ||
disabled: false, | ||
twoFA: false, | ||
username: "userusername", | ||
userRoles: [ | ||
{ | ||
id: "invalidRoleId", | ||
name: "invalid userRole name", | ||
}, | ||
{ | ||
id: "tocVqzvmpI0", | ||
name: "userRole name", | ||
}, | ||
], | ||
//this is a bit different in 2.38.7 | ||
lastUpdated: "", | ||
passwordLastUpdated: "", | ||
selfRegisterd: false, | ||
uid: "", | ||
twoFactorEnabled: false, | ||
}, | ||
createdBy: { | ||
displayName: "fake complete name", | ||
name: "fake complete name", | ||
id: "TuqkLj1igOH", | ||
username: "fakeusername", | ||
}, | ||
userGroups: [ | ||
{ | ||
id: "dhWMtH5yC2h", | ||
name: "userGroup name", | ||
}, | ||
], | ||
userRoles: [ | ||
{ | ||
id: "invalidRoleId", | ||
name: "invalid userRole name", | ||
}, | ||
{ | ||
id: "tocVqzvmpI0", | ||
name: "userRole name", | ||
}, | ||
], | ||
selftRefistered: false, | ||
phoneNumber: "", | ||
passwordLastUpdated: "", | ||
}; | ||
|
||
export const fakeUserWithoutUserGroup: PermissionFixerUser = { | ||
//lastUpdated: "2024-09-16T14:51:06.958", | ||
id: "CHbcHcmgoZ5", | ||
//href: "https://server/api/users/CHbcHcmgoZ5", | ||
//created: "2018-05-02T11:33:24.434", | ||
//lastLogin: "2024-09-16T14:51:06.955", | ||
twoFA: false, | ||
invitation: false, | ||
//selfRegistered: false, | ||
firstName: "Fake", | ||
name: "Fake Dummy", | ||
favorite: false, | ||
//openId: "[email protected]", | ||
displayName: "Fake Dummy", | ||
externalAuth: false, | ||
externalAccess: false, | ||
surname: "Dummy", | ||
disabled: false, | ||
email: "[email protected]", | ||
username: "userusername", | ||
lastUpdatedBy: { | ||
displayName: "fake complete name", | ||
name: "fake complete name", | ||
id: "TuqkLj1igOH", | ||
username: "fakeusername", | ||
}, | ||
userCredentials: { | ||
//openId: "[email protected]", | ||
lastLogin: "2024-09-16T14:51:06.955", | ||
invitation: false, | ||
disabled: false, | ||
twoFA: false, | ||
username: "userusername", | ||
userRoles: [ | ||
{ | ||
id: "tocVqzvmpI0", | ||
name: "userRole name", | ||
}, | ||
], | ||
//this is a bit different in 2.38.7 | ||
lastUpdated: "", | ||
passwordLastUpdated: "", | ||
selfRegisterd: false, | ||
uid: "", | ||
twoFactorEnabled: false, | ||
}, | ||
createdBy: { | ||
displayName: "fake complete name", | ||
name: "fake complete name", | ||
id: "TuqkLj1igOH", | ||
username: "fakeusername", | ||
}, | ||
userGroups: [], | ||
userRoles: [ | ||
{ | ||
id: "tocVqzvmpI0", | ||
name: "userRole name", | ||
}, | ||
], | ||
selftRefistered: false, | ||
phoneNumber: "", | ||
passwordLastUpdated: "", | ||
}; | ||
|
||
export const fakeUserWithOnlyNotTemplateUserGroup: PermissionFixerUser = { | ||
//lastUpdated: "2024-09-16T14:51:06.958", | ||
id: "CHbcHcmgoZ5", | ||
//href: "https://server/api/users/CHbcHcmgoZ5", | ||
|
Oops, something went wrong.