Test Setup Failed
Push — upgrade-cakephp4 ( ed4dd4...238018 )
by giu
03:15
created
src/Controller/AppController.php 1 patch
Indentation   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -45,8 +45,8 @@  discard block
 block discarded – undo
45 45
         $this->loadComponent('RequestHandler');
46 46
         $this->loadComponent('Flash');
47 47
         $this->loadComponent('Security');
48
-		$this->loadComponent('Auth', [
49
-			'authorize' => ['Controller'],
48
+        $this->loadComponent('Auth', [
49
+            'authorize' => ['Controller'],
50 50
             'authenticate' => [
51 51
                 'Form' => [
52 52
                     'fields' => [
@@ -56,30 +56,30 @@  discard block
 block discarded – undo
56 56
                 ]
57 57
             ],
58 58
             'loginAction' => [
59
-				'prefix' => 'admin',
59
+                'prefix' => 'admin',
60 60
                 'controller' => 'Users',
61 61
                 'action' => 'login'
62 62
             ],
63
-			'logoutAction' => [
64
-				'prefix' => 'admin',
63
+            'logoutAction' => [
64
+                'prefix' => 'admin',
65 65
                 'controller' => 'Users',
66 66
                 'action' => 'login'
67 67
             ],
68
-			'unauthorizedRedirect' => $this->referer()
69
-		]);
70
-		$this->Auth->allow();
68
+            'unauthorizedRedirect' => $this->referer()
69
+        ]);
70
+        $this->Auth->allow();
71 71
     }
72 72
 
73
-	public function isAuthorized($user)
74
-	{
75
-		// Admin can access every action
76
-		if (isset($user['role']) && $user['role'] === 'admin') {
77
-			return true;
78
-		}
73
+    public function isAuthorized($user)
74
+    {
75
+        // Admin can access every action
76
+        if (isset($user['role']) && $user['role'] === 'admin') {
77
+            return true;
78
+        }
79 79
 
80
-		// Default permit
81
-		return true;
82
-	}
80
+        // Default permit
81
+        return true;
82
+    }
83 83
 
84 84
 
85 85
     /**
Please login to merge, or discard this patch.