Hosting dev-access: resolve via central identity API (shadow mode)
Deploy Ladill Hosting / deploy (push) Successful in 23s
Deploy Ladill Hosting / deploy (push) Successful in 23s
Consolidate the inline HostingAccountMember lookups (Overview/Search/Hosting Product/Afia controllers) into HostingAccessResolver, which can source hosting developer-access from the monolith's central /identity/hosting/developer-access (correlating cPanel usernames to local account ids). Shadow mode by default (HOSTING_CENTRAL_DEV_ACCESS=false): local hosting_account_members stays authoritative and divergence from central is logged; flip the flag to cut over. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
174ead7d3e
commit
107013bd04
@@ -5,11 +5,11 @@ namespace App\Http\Controllers\Hosting;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\CustomerHostingOrder;
|
||||
use App\Models\HostingAccount;
|
||||
use App\Models\HostingAccountMember;
|
||||
use App\Models\HostingOrder;
|
||||
use App\Models\HostingPlanChange;
|
||||
use App\Models\HostingProduct;
|
||||
use App\Models\RcServiceOrder;
|
||||
use App\Services\Hosting\HostingAccessResolver;
|
||||
use App\Services\Hosting\HostingOrderFulfillmentService;
|
||||
use App\Services\Hosting\HostingPlanChangeService;
|
||||
use App\Services\Hosting\HostingRenewalCheckoutService;
|
||||
@@ -63,9 +63,7 @@ class HostingProductController extends Controller
|
||||
->get();
|
||||
|
||||
// Admin-assigned Hosting Accounts
|
||||
$sharedAccountIds = HostingAccountMember::query()
|
||||
->where('user_id', $user->id)
|
||||
->pluck('hosting_account_id');
|
||||
$sharedAccountIds = app(HostingAccessResolver::class)->sharedAccountIds($user);
|
||||
|
||||
$hostingAccounts = HostingAccount::query()
|
||||
->where(function ($query) use ($user, $sharedAccountIds) {
|
||||
|
||||
Reference in New Issue
Block a user