1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-25 00:07:47 +01:00

fix: avoid scope issues

This commit is contained in:
Ivar Conradi Østhus 2022-03-02 23:48:43 +01:00
parent 321c9a8492
commit d514356030

View File

@ -363,9 +363,9 @@ export default class ProjectService {
const role = await this.findProjectRole(projectId, roleId);
const usersWithRoles = await this.getUsersWithAccess(projectId);
const user = usersWithRoles.users.find((user) => user.id === userId);
const user = usersWithRoles.users.find((u) => u.id === userId);
const currentRole = usersWithRoles.roles.find(
(role) => role.id === user.roleId,
(r) => r.id === user.roleId,
);
if (currentRole.id === roleId) {