Forbid permissions update cross app role retarget (#19982)

closes https://github.com/twentyhq/twenty/issues/19807
This commit is contained in:
Paul Rastoin
2026-04-22 17:39:26 +02:00
committed by GitHub
parent 0696290af4
commit 921a0f01c8
12 changed files with 470 additions and 34 deletions
@@ -145,7 +145,7 @@ const getPermissionsExceptionUserFriendlyMessage = (
case PermissionsExceptionCode.APPLICATION_ROLE_NOT_FOUND:
return msg`No role assigned to the application.`;
case PermissionsExceptionCode.ROLE_BELONGS_TO_ANOTHER_APPLICATION:
return msg`Cannot modify permissions on a role owned by another application.`;
return msg`Cannot target a role owned by another application.`;
default:
assertUnreachable(code);
}