-
-
Notifications
You must be signed in to change notification settings - Fork 736
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: list users and groups under each role in projectaccessadded ev…
…ent (#5581) ## About the changes Changes the project access added event to list all users and groups added to each role instead of in root event.
- Loading branch information
Showing
2 changed files
with
19 additions
and
11 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -121,11 +121,13 @@ test('should anonymise any PII fields, no matter the depth', async () => { | |
createdBy: '[email protected]', | ||
createdByUserId: TEST_USER_ID, | ||
data: { | ||
groups: [ | ||
roles: [ | ||
{ | ||
name: 'test', | ||
project: 'default', | ||
users: [{ username: testUsername }], | ||
roleId: 1, | ||
groupIds: [1, 2], | ||
// Doesn't reflect the real data structure for event here, normally a number array. | ||
// Testing PII anonymisation | ||
users: [{ id: 1, username: testUsername }], | ||
}, | ||
], | ||
}, | ||
|
@@ -138,7 +140,7 @@ test('should anonymise any PII fields, no matter the depth', async () => { | |
.expect(200); | ||
|
||
expect(body.events.length).toBe(1); | ||
expect(body.events[0].data.groups[0].users[0].username).not.toBe( | ||
expect(body.events[0].data.roles[0].users[0].username).not.toBe( | ||
testUsername, | ||
); | ||
}); |
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