commit compras1 3011
tests / ci (push) Canceled after 0s

This commit is contained in:
2026-11-30 09:33:36 +02:00
parent 96b30368bc
commit 47649bd46c
163 changed files with 9419 additions and 145 deletions
+29
View File
@@ -0,0 +1,29 @@
<?php
namespace App\Models;
use App\Models\Concerns\BelongsToTenant;
use Illuminate\Database\Eloquent\Model;
/** @property int $id
* @property int $tenant_id
* @property int $version
* @property bool $active
* @property string $client_key
* @property string $code
* @property string $name
* @property string|null $tax_number
* @property string $creation_hash
* @property int $created_by
*/
class BusinessClient extends Model
{
use BelongsToTenant;
protected $guarded = ['id'];
protected function casts(): array
{
return ['active' => 'boolean', 'version' => 'integer'];
}
}
+1 -1
View File
@@ -30,7 +30,7 @@ trait HasWorkContext
if ($actor instanceof User && app(WorkContext::class)->enforced($actor)) {
$key = app(WorkContext::class)->active(request());
$area = $model->getTable() === 'people_processes' ? 'people' : 'procurement';
abort_unless($key !== null && WorkContext::OPTIONS[$key]['operational'] && WorkContext::OPTIONS[$key]['area'] === $area, 403);
abort_unless($key !== null && WorkContext::operational($key) && WorkContext::OPTIONS[$key]['area'] === $area, 403);
$model->setAttribute('work_context_key', $key);
}
});