modified: .bash_history

modified:   SRC/app/Http/Middleware/RedirectIfNotAdmin.php
This commit is contained in:
www 2015-02-18 01:23:17 +01:00
parent a91807ba12
commit 09ab8c15ee
2 changed files with 11 additions and 0 deletions

View File

@ -80,3 +80,5 @@ exit
cd .. cd ..
ls ls
nano loadCSVAugustin2014.py nano loadCSVAugustin2014.py
git pull
exit

View File

@ -35,6 +35,15 @@ class RedirectIfNotAdmin {
*/ */
public function handle($request, Closure $next) public function handle($request, Closure $next)
{ {
//Retour d'un admin loguer comme un referent
if($this->auth->check() AND Session::has('admin'))
{
Auth::logout();
Auth::loginUsingId(Session::get('admin'));
Session::forget('admin');
}
//verification de l'identité de l'admin
if (!$this->auth->check() OR Auth::user()->droits == 0) if (!$this->auth->check() OR Auth::user()->droits == 0)
{ {
return new RedirectResponse(url('/login')); return new RedirectResponse(url('/login'));