Completed
Pull Request — master (#134)
by
unknown
06:41
created
app/Providers/AuthServiceProvider.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -45,10 +45,10 @@
 block discarded – undo
45 45
     {
46 46
         $this->registerPolicies();
47 47
     
48
-        Gate::define('index-dashboard', function ($user) {
48
+        Gate::define('index-dashboard', function($user) {
49 49
             return $user->isUser();
50 50
         });
51
-        Gate::define('index-activitylog', function ($user) {
51
+        Gate::define('index-activitylog', function($user) {
52 52
             return $user->isManager();
53 53
         });
54 54
     }
Please login to merge, or discard this patch.
app/Http/Controllers/ActivityLogController.php 1 patch
Braces   +5 added lines, -4 removed lines patch added patch discarded remove patch
@@ -28,10 +28,11 @@
 block discarded – undo
28 28
      */
29 29
     public function index(ActivityLogDataTable $dataTable)
30 30
     {
31
-        if (Gate::denies('index-activitylog'))
32
-            throw new AuthorizationException("This action is unauthorized.");
33
-        else
34
-            return $dataTable->render('activitylog.index');
31
+        if (Gate::denies('index-activitylog')) {
32
+                    throw new AuthorizationException("This action is unauthorized.");
33
+        } else {
34
+                    return $dataTable->render('activitylog.index');
35
+        }
35 36
     }
36 37
 
37 38
 }
Please login to merge, or discard this patch.