svg
This commit is contained in:
parent
4b798fd1f9
commit
7d56eb6e2a
@ -1,7 +1,7 @@
|
|||||||
LoadModule rewrite_module modules/mod_rewrite.so
|
LoadModule rewrite_module modules/mod_rewrite.so
|
||||||
ServerName nineapache.local
|
ServerName nineapache.local
|
||||||
DocumentRoot "/app/public"
|
DocumentRoot "/app/public"
|
||||||
Alias /ninefolio /app/public
|
Alias /ninecompta /app/public
|
||||||
<Directory "/app/public">
|
<Directory "/app/public">
|
||||||
Options Indexes FollowSymLinks
|
Options Indexes FollowSymLinks
|
||||||
AllowOverride All
|
AllowOverride All
|
||||||
|
@ -8,5 +8,6 @@ cd ../..
|
|||||||
DIR=$(pwd)
|
DIR=$(pwd)
|
||||||
|
|
||||||
bin/console d:s:u --force --complete
|
bin/console d:s:u --force --complete
|
||||||
|
bin/console app:init
|
||||||
|
|
||||||
exec $@
|
exec $@
|
@ -19,13 +19,14 @@ final class LogoutListener
|
|||||||
public function onLogoutEvent(LogoutEvent $event): void
|
public function onLogoutEvent(LogoutEvent $event): void
|
||||||
{
|
{
|
||||||
if ('CAS' == $this->parameterBag->get('modeAuth')) {
|
if ('CAS' == $this->parameterBag->get('modeAuth')) {
|
||||||
// Initialiser phpCAS
|
|
||||||
$request = $event->getRequest();
|
$request = $event->getRequest();
|
||||||
$host = $request->headers->get('X-Forwarded-Host') ?? $request->getHost().($request->getPort() ? ':'.$request->getPort() : '');
|
$host = $request->headers->get('X-Forwarded-Host') ?? $request->getHost().($request->getPort() ? ':'.$request->getPort() : '');
|
||||||
$scheme = $request->headers->get('X-Forwarded-Proto') ?? $request->getScheme();
|
$scheme = $request->headers->get('X-Forwarded-Proto') ?? $request->getScheme();
|
||||||
$url = $scheme.'://'.$host;
|
$url = $scheme.'://'.$host;
|
||||||
\phpCAS::client(CAS_VERSION_2_0, $this->parameterBag->get('casHost'), (int) $this->parameterBag->get('casPort'), $this->parameterBag->get('casPath'), $url, false);
|
\phpCAS::client(CAS_VERSION_2_0, $this->parameterBag->get('casHost'), (int) $this->parameterBag->get('casPort'), $this->parameterBag->get('casPath'), $url, false);
|
||||||
\phpCAS::setNoCasServerValidation();
|
\phpCAS::setNoCasServerValidation();
|
||||||
|
|
||||||
|
$url.=$request->getBaseUrl();
|
||||||
\phpCAS::logoutWithRedirectService($url);
|
\phpCAS::logoutWithRedirectService($url);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -41,7 +41,7 @@ final class SessionListener
|
|||||||
|
|
||||||
$currentPath = $request->getPathInfo();
|
$currentPath = $request->getPathInfo();
|
||||||
$noCompanyPath = $this->router->generate('app_user_nocompany');
|
$noCompanyPath = $this->router->generate('app_user_nocompany');
|
||||||
if (!$user->getCompany() && $currentPath != $noCompanyPath) {
|
if (!$user->getCompany() && stripos($currentPath,'nocompany')===0) {
|
||||||
$event->setResponse(new RedirectResponse($noCompanyPath));
|
$event->setResponse(new RedirectResponse($noCompanyPath));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user