Need a unique gift idea?
A Pastebin account makes a great Christmas gift
SHARE
TWEET

Untitled

a guest Sep 23rd, 2018 63 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  1. <?php
  2.  
  3. require_once __DIR__.'/../../../../../../app/bootstrap.php.cache';
  4. require_once __DIR__.'/../../../../../../app/AppKernel.php';
  5.  
  6. use Symfony\Component\HttpFoundation\Request;
  7.  
  8. /**
  9.  * This function must check the user session to be sure that he/she is
  10.  * authorized to upload and access files in the File Browser.
  11.  *
  12.  * @return boolean
  13.  */
  14. function CheckAuthentication()
  15. {
  16.     $kernel = new AppKernel('prod', true);
  17.     $kernel->loadClassCache();
  18.     $request = Request::createFromGlobals();
  19.     $request->request->set('_route', 'admin');
  20.     $response = $kernel->handle($request);
  21.     $container = $kernel->getContainer();
  22.     return $container->get('security.context')->isGranted('ROLE_FILE_UPLOADER');
  23. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top