Release 2.18 (#4878)

This commit is contained in:
Kevin Papst
2024-06-16 13:15:49 +02:00
committed by GitHub
parent 8792a1df09
commit 987b46bf8f
46 changed files with 1768 additions and 814 deletions

View File

@@ -456,19 +456,22 @@ final class ActivityController extends AbstractController
}
/**
* @param Activity $activity
* @return FormInterface<ActivityEditForm>
*/
private function createEditForm(Activity $activity): FormInterface
{
$currency = $this->configuration->getCustomerDefaultCurrency();
$url = $this->generateUrl('admin_activity_create');
if ($activity->getProject()?->getId() !== null) {
$url = $this->generateUrl('admin_activity_create_with_project', ['project' => $activity->getProject()->getId()]);
}
if ($activity->getId() !== null) {
$url = $this->generateUrl('admin_activity_edit', ['id' => $activity->getId()]);
if (null !== $activity->getProject()) {
$currency = $activity->getProject()->getCustomer()->getCurrency();
}
}
if (null !== $activity->getProject()) {
$currency = $activity->getProject()->getCustomer()->getCurrency();
}
return $this->createForm(ActivityEditForm::class, $activity, [

View File

@@ -47,7 +47,7 @@ final class SamlController extends AbstractController
$session->remove($authErrorKey);
}
if ($error) {
if ($error !== null) {
if (\is_object($error) && method_exists($error, 'getMessage')) {
$error = $error->getMessage();
}
@@ -60,13 +60,12 @@ final class SamlController extends AbstractController
$redirectTarget = $this->generateUrl('homepage', [], UrlGeneratorInterface::ABSOLUTE_URL);
}
$url = $this->authFactory->create()->login($redirectTarget);
$url = $this->authFactory->create()->login($redirectTarget, [], false, false, true);
if ($url === null) {
throw new \RuntimeException('SAML login failed');
}
// this line is not (yet) reached, as the previous call will exit
return $this->redirect($url);
}