table('permission_grants')->whereIn('permission',$names)->count();$out=['passed'=>true,'book'=>$book,'right_names'=>$names,'existing_grants'=>$n,'grants_applied'=>0,'business_commands'=>0,'new_demo'=>false];file_put_contents($work.'/cash-rights-readonly.json',json_encode($out,JSON_PRETTY_PRINT));echo json_encode(['passed'=>true,'book'=>$book,'existing_grants'=>$n,'proof'=>$work.'/cash-rights-readonly.json']).PHP_EOL;