]> _ Git - fluidbook-toolbox.git/commitdiff
wip #3753 @1
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 1 Dec 2020 15:41:32 +0000 (16:41 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 1 Dec 2020 15:41:32 +0000 (16:41 +0100)
app/Http/Controllers/Admin/Operations/LogOperation.php
app/Models/Quiz.php
app/Providers/AuthServiceProvider.php

index cdf8b4b8b8a772f14c0d59fe108c9602a59446e7..89d52093fb0eb7f78ec9eb09a9197b8053b3583f 100644 (file)
@@ -15,7 +15,7 @@ trait LogOperation
 {
     protected function setupLogRoutes($segment, $routeName, $controller)
     {
-        Route::match(['post'], $segment . '/{id}/log', $controller . '@log')->withoutMiddleware([VerifyCsrfToken::class, Authenticate::class, CheckIfAdmin::class]);
+        Route::match(['post','get'], $segment . '/{id}/log', $controller . '@log')->withoutMiddleware([VerifyCsrfToken::class, Authenticate::class, CheckIfAdmin::class]);
     }
 
     protected function log($id)
index e3b5f35b5b2ba7974487aeffe099cefd4f60fa2a..1ddc926f6f80ef60d74cec5db476d88ec2e5c3a6 100644 (file)
@@ -330,6 +330,11 @@ class Quiz extends CubistMagicAbstractModel
         return self::$_actions;
     }
 
+    public function canLog($user)
+    {
+        return true;
+    }
+
     public function create(array $data)
     {
         if (!can('viewany')) {
index 138b1dfec8b635ee8f95aa0bbc7f49ac57857032..89f36732d953cf597814dc5b0da3075635f38c05 100644 (file)
@@ -2,10 +2,13 @@
 
 namespace App\Providers;
 
-use Cubist\Backpack\app\Magic\Policies\CubistMagicPolicy;
-use Cubist\Backpack\app\Providers\AuthServiceProvider as ServiceProvider;
+use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
 
 class AuthServiceProvider extends ServiceProvider
 {
-    protected $_defaultPolicy = CubistMagicPolicy::class;
+
+    public function boot()
+    {
+        $this->registerPolicies();
+    }
 }