mirror of
https://github.com/Unleash/unleash.git
synced 2025-10-27 11:02:16 +01:00
chore: list users and groups under each role in projectaccessadded event
This commit is contained in:
parent
9508c79451
commit
e67c20d8bb
@ -116,11 +116,11 @@ test('should anonymise any PII fields, no matter the depth', async () => {
|
|||||||
new ProjectAccessAddedEvent({
|
new ProjectAccessAddedEvent({
|
||||||
createdBy: 'some@email.com',
|
createdBy: 'some@email.com',
|
||||||
data: {
|
data: {
|
||||||
groups: [
|
roles: [
|
||||||
{
|
{
|
||||||
name: 'test',
|
roleId: 1,
|
||||||
project: 'default',
|
groupIds: [1, 2],
|
||||||
users: [{ username: testUsername }],
|
users: [1],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|||||||
@ -661,9 +661,11 @@ export default class ProjectService {
|
|||||||
project: projectId,
|
project: projectId,
|
||||||
createdBy,
|
createdBy,
|
||||||
data: {
|
data: {
|
||||||
|
roles: {
|
||||||
roleId,
|
roleId,
|
||||||
groups: usersAndGroups.groups.map(({ id }) => id),
|
groupIds: usersAndGroups.groups.map(({ id }) => id),
|
||||||
users: usersAndGroups.users.map(({ id }) => id),
|
userIds: usersAndGroups.users.map(({ id }) => id),
|
||||||
|
},
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
@ -689,9 +691,13 @@ export default class ProjectService {
|
|||||||
project: projectId,
|
project: projectId,
|
||||||
createdBy,
|
createdBy,
|
||||||
data: {
|
data: {
|
||||||
roles,
|
roles: roles.map((roleId) => {
|
||||||
groups,
|
return {
|
||||||
users,
|
roleId,
|
||||||
|
groupIds: groups,
|
||||||
|
userIds: users,
|
||||||
|
};
|
||||||
|
}),
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user