Release 2.18 (#4878)
This commit is contained in:
@@ -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, [
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user