fix permission bug
This commit is contained in:
@@ -26,7 +26,7 @@ class LoanOrderPolicy
|
||||
}
|
||||
|
||||
if ($user->isOperator()) {
|
||||
return $user->branches()->where('id', $loanOrder->branch_id)->exists();
|
||||
return $user->branches()->where('branches.id', $loanOrder->branch_id)->exists();
|
||||
}
|
||||
|
||||
if ($user->ownsLoanOrder($loanOrder)) {
|
||||
@@ -54,7 +54,7 @@ class LoanOrderPolicy
|
||||
}
|
||||
|
||||
if ($user->isOperator()) {
|
||||
return $user->branches()->where('id', $loanOrder->branch_id)->exists();
|
||||
return $user->branches()->where('branches.id', $loanOrder->branch_id)->exists();
|
||||
}
|
||||
|
||||
if ($user->ownsLoanOrder($loanOrder) && in_array($loanOrder->status, [
|
||||
@@ -76,7 +76,7 @@ class LoanOrderPolicy
|
||||
}
|
||||
|
||||
if ($user->isOperator()) {
|
||||
return $user->branches()->where('id', $loanOrder->branch_id)->exists();
|
||||
return $user->branches()->where('branches.id', $loanOrder->branch_id)->exists();
|
||||
}
|
||||
|
||||
if ($user->ownsLoanOrder($loanOrder)) {
|
||||
|
||||
Reference in New Issue
Block a user