bouncer
bouncer copied to clipboard
Owned via in the abilities
I need to own one model by 2 or more users, so I put owned_via
in the ability option:
$this->bouncer
->allow('buyer')
->toOwn(Order::class, ['options' => ['owned_via' => 'buyer_id']])
->to(['read', 'write']);
$this->bouncer
->allow('seller')
->toOwn(Order::class, ['options' => ['owned_via' => 'seller_id']])
->to(['read']);
but it doesn't create a new ability if only the options
are different.
Could we create separeted record in that case? or maybe we could add owned_via
column :thinking: