From 348e957735db5819de8c60fefef2250539974b6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Denis=20Duli=C3=A7i?= Date: Mon, 14 Dec 2020 15:11:38 +0300 Subject: [PATCH] updated laratrust version --- app/Providers/Auth.php | 9 --------- composer.json | 2 +- composer.lock | 18 +++++++++--------- 3 files changed, 10 insertions(+), 19 deletions(-) diff --git a/app/Providers/Auth.php b/app/Providers/Auth.php index 92a989fa3..4b8b76517 100644 --- a/app/Providers/Auth.php +++ b/app/Providers/Auth.php @@ -2,8 +2,6 @@ namespace App\Providers; -use Illuminate\Contracts\Auth\Access\Authorizable; -use Illuminate\Contracts\Auth\Access\Gate; use Illuminate\Foundation\Support\Providers\AuthServiceProvider as Provider; class Auth extends Provider @@ -25,12 +23,5 @@ class Auth extends Provider public function boot() { $this->registerPolicies(); - - // Register permissions to Laravel Gate - app(Gate::class)->before(function (Authorizable $user, string $ability) { - if (method_exists($user, 'hasPermission')) { - return $user->hasPermission($ability) ?: null; - } - }); } } diff --git a/composer.json b/composer.json index c24953cfe..450054c6a 100644 --- a/composer.json +++ b/composer.json @@ -49,7 +49,7 @@ "monooso/unobserve": "^3.0", "plank/laravel-mediable": "4.4.*", "riverskies/laravel-mobile-detect": "^1.3", - "santigarcor/laratrust": "6.2.*", + "santigarcor/laratrust": "6.3.*", "simshaun/recurr": "4.0.*", "staudenmeir/belongs-to-through": "^2.11", "staudenmeir/eloquent-has-many-deep": "^1.13" diff --git a/composer.lock b/composer.lock index 0295b4e47..cd51db2d9 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "51666397fc0545e8e14af377d5486a5f", + "content-hash": "4ace9899196a414a1d402f38b3687252", "packages": [ { "name": "akaunting/firewall", @@ -8229,25 +8229,25 @@ }, { "name": "santigarcor/laratrust", - "version": "6.2.2", + "version": "6.3.1", "source": { "type": "git", "url": "https://github.com/santigarcor/laratrust.git", - "reference": "dfc2f0880c827bd20607fd4bfbe8ac471de29800" + "reference": "dcb43416ecfeacb67e056423780e288c325e9c82" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/santigarcor/laratrust/zipball/dfc2f0880c827bd20607fd4bfbe8ac471de29800", - "reference": "dfc2f0880c827bd20607fd4bfbe8ac471de29800", + "url": "https://api.github.com/repos/santigarcor/laratrust/zipball/dcb43416ecfeacb67e056423780e288c325e9c82", + "reference": "dcb43416ecfeacb67e056423780e288c325e9c82", "shasum": "" }, "require": { "kkszymanowski/traitor": "^0.2.0", "laravel/framework": "~6.0|~7.0|~8.0", - "php": "^7.2" + "php": ">=7.2" }, "require-dev": { - "mockery/mockery": "^1.3.1", + "mockery/mockery": "^1.3.2", "orchestra/testbench": "4.*|5.*|6.*", "phpunit/phpunit": "^7.5.15|^8.4|^9.0" }, @@ -8292,7 +8292,7 @@ ], "support": { "issues": "https://github.com/santigarcor/laratrust/issues", - "source": "https://github.com/santigarcor/laratrust/tree/6.2.2" + "source": "https://github.com/santigarcor/laratrust/tree/6.3.1" }, "funding": [ { @@ -8300,7 +8300,7 @@ "type": "github" } ], - "time": "2020-09-15T13:30:03+00:00" + "time": "2020-12-09T14:25:23+00:00" }, { "name": "seld/jsonlint",