items that belongs to a package cannot be transferred.

This commit is contained in:
Moradi
2025-04-09 14:02:13 +03:30
parent 6311e2af70
commit f9023086c9
2 changed files with 14 additions and 10 deletions
@@ -58,7 +58,7 @@ class TransferItemController extends Controller
public function transfer( StoreTransferRequest $request , Item $Item )
{
if ( auth( 'api' )->user()->cant( 'transferItem' , [ Transfer::class , $Item ] ) ) {
if ( auth( 'api' )->user()->cant( 'transferItem' , [ auth()->user() , $Item ] ) ) {
return MessageResponse::error( trans( 'messages.access_denied' ) );
}
if ( $Item->user_id != $request->user_id ) {