Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/3.x' into 3.x
Browse files Browse the repository at this point in the history
  • Loading branch information
lee-to committed Sep 10, 2024
2 parents 2b98ff9 + 79a0226 commit 6e7637e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Traits/HasMoonShinePermissions.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@

use Illuminate\Database\Eloquent\Relations\HasOne;
use MoonShine\Laravel\Enums\Ability;
use MoonShine\Permissions\Models\MoonshineUserPermission;
use MoonShine\Laravel\MoonShineAuth;
use MoonShine\Permissions\Models\MoonshineUserPermission;

trait HasMoonShinePermissions
{
public function isHavePermission(string $resourceClass, Ability $ability): bool
{
return !empty($this->moonshineUserPermission?->permissions[$resourceClass][$ability->value]);
return ! empty($this->moonshineUserPermission?->permissions[$resourceClass][$ability->value]);
}

public function moonshineUserPermission(): HasOne
Expand Down

0 comments on commit 6e7637e

Please sign in to comment.