modified: .bash_history
modified: SRC/app/Http/Middleware/RedirectIfNotAdmin.php
This commit is contained in:
parent
a91807ba12
commit
09ab8c15ee
@ -80,3 +80,5 @@ exit
|
||||
cd ..
|
||||
ls
|
||||
nano loadCSVAugustin2014.py
|
||||
git pull
|
||||
exit
|
||||
|
@ -35,6 +35,15 @@ class RedirectIfNotAdmin {
|
||||
*/
|
||||
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)
|
||||
{
|
||||
return new RedirectResponse(url('/login'));
|
||||
|
Reference in New Issue
Block a user