mirror of
https://github.com/getnamingo/registry.git
synced 2025-08-04 00:31:50 +02:00
Various domain transfer fixes
This commit is contained in:
parent
d9743c6f50
commit
9625d648a0
3 changed files with 23 additions and 3 deletions
|
@ -252,7 +252,15 @@ $app->any('/api[/{params:.*}]', function (
|
|||
'users_audit' => 'user_id', // Continues to use user_id
|
||||
];
|
||||
|
||||
// Check if the special filter condition for the domain table is met
|
||||
$isSpecialDomainRequest = $tableName === 'domain' && isset($_GET['filter']) && $_GET['filter'] === 'trstatus,nis';
|
||||
|
||||
if (array_key_exists($tableName, $columnMap)) {
|
||||
// If it's a special domain request, bypass the usual filtering
|
||||
if ($isSpecialDomainRequest) {
|
||||
return [];
|
||||
}
|
||||
|
||||
// Use registrarId for tables where 'registrar_id' is the filter
|
||||
// For 'support_tickets' and 'users_audit', use userId
|
||||
return [$columnMap[$tableName] => (in_array($tableName, ['support_tickets', 'users_audit']) ? $_SESSION['auth_user_id'] : $registrarId)];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue