Merge branch 'dev/uoa-bugfix' into 'develop'

fix role not recognized

See merge request easy-solutions/apps/easyportal!51
This commit is contained in:
Charles-Edouard MARGUERITE 2026-03-03 15:43:39 +00:00
commit 3200d05ed6
2 changed files with 3 additions and 5 deletions

View File

@ -181,12 +181,11 @@ readonly class LoggerService
]));
}
public function logUOALinkDeactivated(int $uoaId, int $appId, int $roleId): void
public function logUOALinkDeactivated(int $uoaId, int $appId): void
{
$this->organizationManagementLogger->notice('UOA link deactivated', [
'uoa_id' => $uoaId,
'app_id' => $appId,
'role_id' => $roleId,
'ip' => $this->requestStack->getCurrentRequest()?->getClientIp() ?? 'unknown',
'timestamp' => $this->now(),
]);

View File

@ -94,14 +94,13 @@ class UserOrganizationAppService
try{
$uoa->setIsActive(false);
$this->actionService->createAction("Deactivate UOA link", $userOrganization->getUsers(),
$userOrganization->getOrganization(), "App: " . $uoa->getApplication()->getName() . ", Role: " . $uoa->getRole()->getName());
$userOrganization->getOrganization(), "App: " . $uoa->getApplication()->getName());
$this->entityManager->persist($uoa);
$this->loggerService->logUOALinkDeactivated($uoa->getId(), $uoa->getApplication()->getId(), $uoa->getRole()->getId());
$this->loggerService->logUOALinkDeactivated($uoa->getId(), $uoa->getApplication()->getId());
}catch (\Exception $exception){
$this->loggerService->logCritical("Error deactivating UOA link", [
'uoa_id' => $uoa->getId(),
'app_id' => $uoa->getApplication()->getId(),
'role_id' => $uoa->getRole()->getId(),
'exception_message' => $exception->getMessage(),
]);
}