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