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({
|
||||
createdBy: 'some@email.com',
|
||||
data: {
|
||||
groups: [
|
||||
roles: [
|
||||
{
|
||||
name: 'test',
|
||||
project: 'default',
|
||||
users: [{ username: testUsername }],
|
||||
roleId: 1,
|
||||
groupIds: [1, 2],
|
||||
users: [1],
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
@ -661,9 +661,11 @@ export default class ProjectService {
|
||||
project: projectId,
|
||||
createdBy,
|
||||
data: {
|
||||
roles: {
|
||||
roleId,
|
||||
groups: usersAndGroups.groups.map(({ id }) => id),
|
||||
users: usersAndGroups.users.map(({ id }) => id),
|
||||
groupIds: usersAndGroups.groups.map(({ id }) => id),
|
||||
userIds: usersAndGroups.users.map(({ id }) => id),
|
||||
},
|
||||
},
|
||||
}),
|
||||
);
|
||||
@ -689,9 +691,13 @@ export default class ProjectService {
|
||||
project: projectId,
|
||||
createdBy,
|
||||
data: {
|
||||
roles,
|
||||
groups,
|
||||
users,
|
||||
roles: roles.map((roleId) => {
|
||||
return {
|
||||
roleId,
|
||||
groupIds: groups,
|
||||
userIds: users,
|
||||
};
|
||||
}),
|
||||
},
|
||||
}),
|
||||
);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user