commit melhorias1

This commit is contained in:
2026-11-11 15:04:01 +02:00
parent 1d11a5e57b
commit cd9897df05
145 changed files with 10950 additions and 84 deletions
+2
View File
@@ -0,0 +1,2 @@
<?php
$book=$argv[1]??'8085';require __DIR__.'/sgf-single-bootstrap.php';$rights=['fixed_assets.view','fixed_assets.prepare','fixed_assets.review'];$rows=$host->table('permission_grants')->whereIn('permission',$rights)->get(['permission','user_id','tenant_id','company_id','unit_id'])->all();if($rows!==[])throw new LogicException('Reconcile existing asset rights');$old=$host->table('permission_grants')->where(['tenant_id'=>1,'company_id'=>2,'unit_id'=>2])->whereIn('user_id',[15,16,17])->where('permission','like','general_ledger.%')->orderBy('user_id')->orderBy('permission')->get(['user_id','permission'])->all();file_put_contents($work.'/assets-access-readonly.json',json_encode(['passed'=>true,'book'=>$book,'proposed_rights'=>$rights,'existing_asset_grants'=>$rows,'existing_ledger_grants'=>$old,'new_grants'=>0,'database_writes'=>0],JSON_PRETTY_PRINT));echo json_encode(['passed'=>true,'book'=>$book,'missing_asset_rights'=>3,'proof'=>$work.'/assets-access-readonly.json']).PHP_EOL;