@@ -22,6 +22,26 @@ class SuperAdminProgramSettingsOverlay
|
||||
|
||||
private const LAST_GOOD_CACHE_MINUTES = 1440;
|
||||
|
||||
/**
|
||||
* تنها کلیدهایی که مالکشان سوپرادمین است — گروه «دسترسی مشتری به قابلیتها».
|
||||
* هر کلید دیگری مالکش جدول settings همین نصب است و در overlay دور ریخته میشود.
|
||||
*/
|
||||
public const SUPERADMIN_OWNED_KEYS = [
|
||||
'customer_direct_sms',
|
||||
'customer_special_pricing',
|
||||
'enable_conditional_order',
|
||||
'enable_customer_level_profit',
|
||||
'enable_product_funds',
|
||||
'group_sms',
|
||||
'has_page_earn_money',
|
||||
'has_page_gift_card',
|
||||
'has_page_notification',
|
||||
'has_page_price_trigger',
|
||||
'jibit_enabled',
|
||||
'permision__enabled',
|
||||
'show_to_users_chat',
|
||||
];
|
||||
|
||||
/** کلیدهایی که هنوز صفحهٔ اختصاصی ادمین خانگی مالکشان است */
|
||||
public const LOCAL_OWNED_KEYS = [
|
||||
'tracking_systems',
|
||||
@@ -114,7 +134,7 @@ class SuperAdminProgramSettingsOverlay
|
||||
continue;
|
||||
}
|
||||
$key = trim((string) ($row['key'] ?? ''));
|
||||
if ($key === '' || in_array($key, self::LOCAL_OWNED_KEYS, true) || in_array($key, self::RUNTIME_KEYS, true)) {
|
||||
if ($key === '' || ! self::isSuperAdminOwned($key)) {
|
||||
continue;
|
||||
}
|
||||
$map[$key] = $row;
|
||||
@@ -192,4 +212,9 @@ class SuperAdminProgramSettingsOverlay
|
||||
{
|
||||
return in_array($key, self::LOCAL_OWNED_KEYS, true);
|
||||
}
|
||||
|
||||
public static function isSuperAdminOwned(string $key): bool
|
||||
{
|
||||
return in_array(trim($key), self::SUPERADMIN_OWNED_KEYS, true);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user