Skip to content

Commit

Permalink
Merge pull request #376 from nexco-lk/permission-assignment-on-seeder…
Browse files Browse the repository at this point in the history
…-fix

permission assignment on seeder fix
  • Loading branch information
curtisdelicata authored Jan 16, 2025
2 parents 0d09177 + d14eaa8 commit f90dce6
Show file tree
Hide file tree
Showing 4 changed files with 100 additions and 660 deletions.
4 changes: 2 additions & 2 deletions app/Models/Role.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ public function team(): BelongsTo
return $this->belongsTo(Team::class);
}

public function hasPermissionTo($permission): bool
public function hasPermissionTo($permission, $guardName = null): bool
{
return $this->permissions()->where('name', $permission)->exists();
return $this->permissions()->where('name', $permission)->exists() ?? false;
}

public static function defaultRoles(): array
Expand Down
Loading

0 comments on commit f90dce6

Please sign in to comment.