daily pastebin goal
64%
SHARE
TWEET

Untitled

a guest Feb 9th, 2018 74 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. /**
  3. *
  4. * @ This file is created by http://DeZender.Net
  5. * @ deZender (PHP5 Decoder for ionCube Encoder)
  6. *
  7. * @ Version         :   3.0.8.0
  8. * @ Author          :   DeZender
  9. * @ Release on      :   25.09.2017
  10. * @ Official site   :   http://DeZender.Net
  11. *
  12. */
  13.  
  14. namespace Modules\Acl\Http\Middleware;
  15.  
  16. class VerifyRoleAndPermission
  17. {
  18.     protected $replaceMethods = array(
  19.         'store'  => 'create',
  20.         'update' => 'edit'
  21.     );
  22.  
  23.     /**
  24.      * Handle an incoming request.
  25.      *
  26.      * @param  \Illuminate\Http\Request  $request
  27.      * @param  \Closure  $next
  28.      * @return mixed
  29.      */
  30.     public function handle($request, Closure $next)
  31.     {
  32.         if ($request->segment( 1 ) !== admin_path(  )) {
  33.             abort( 500 );
  34.         }
  35.  
  36.         $permission = $this->getPermission( $request );
  37.         if (\Illuminate\Support\Facades\Auth::check(  ) && (allow( $permission ) || $request->user(  )->is_super_admin)) {
  38.             $this->setupPermissionForFileManager( $request->user(  ) );
  39.             return $next( $request );
  40. .........................................................................
  41. ..................................
  42. ...........
RAW Paste Data
Top