Fix displaying first service/invoice/account for user
This commit is contained in:
parent
4935a9f5ff
commit
589aeb7289
@ -21,7 +21,7 @@ class AccountPolicy
|
||||
public function view(User $user, Account $o)
|
||||
{
|
||||
// If this is a service for an account managed by a user.
|
||||
return ($user->accounts->pluck('id')->search($o->id))
|
||||
return ($user->accounts->pluck('id')->search($o->id) !== FALSE)
|
||||
|
||||
// The user is the wholesaler
|
||||
OR $user->isWholesaler()
|
||||
|
@ -21,7 +21,7 @@ class InvoicePolicy
|
||||
public function view(User $user, Invoice $o)
|
||||
{
|
||||
// If this is a service for an account managed by a user.
|
||||
return ($user->invoices->pluck('id')->search($o->id))
|
||||
return ($user->invoices->pluck('id')->search($o->id) !== FALSE)
|
||||
|
||||
// The user is the wholesaler
|
||||
OR $user->isWholesaler()
|
||||
|
@ -21,7 +21,7 @@ class ServicePolicy
|
||||
public function view(User $user, Service $o)
|
||||
{
|
||||
// If this is a service for an account managed by a user.
|
||||
return ($user->services->pluck('id')->search($o->id))
|
||||
return ($user->services->pluck('id')->search($o->id) !== FALSE)
|
||||
|
||||
// The user is the wholesaler
|
||||
OR $user->isWholesaler()
|
||||
|
Loading…
Reference in New Issue
Block a user