mirror of
https://github.com/Unleash/unleash.git
synced 2025-09-05 17:53:12 +02:00
chore: pick all roles
This commit is contained in:
parent
1f4126e495
commit
3d4dd30cb9
@ -901,10 +901,19 @@ export default class ProjectService {
|
|||||||
newRoles: number[],
|
newRoles: number[],
|
||||||
auditUser: IAuditUser,
|
auditUser: IAuditUser,
|
||||||
): Promise<void> {
|
): Promise<void> {
|
||||||
const currentRoles = await this.accessService.getProjectRolesForUser(
|
let currentRoles = await this.accessService.getProjectRolesForUser(
|
||||||
projectId,
|
projectId,
|
||||||
userId,
|
userId,
|
||||||
);
|
);
|
||||||
|
const groups = await this.groupService.getGroupsForUser(userId);
|
||||||
|
for (const group of groups) {
|
||||||
|
currentRoles = currentRoles.concat(
|
||||||
|
await this.accessService.getProjectRolesForGroup(
|
||||||
|
projectId,
|
||||||
|
group.id,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
const ownerRole = await this.accessService.getRoleByName(
|
const ownerRole = await this.accessService.getRoleByName(
|
||||||
RoleName.OWNER,
|
RoleName.OWNER,
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user