minor fixes and first tests for Domains-ApiCommand

Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann (d00p)
2018-03-01 16:46:47 +01:00
parent 2bf5e90a77
commit 02616d3080
4 changed files with 92 additions and 15 deletions

View File

@@ -183,10 +183,6 @@ class Domains extends ApiCommand implements ResourceEntity
))->get();
$customer = json_decode($json_result, true)['data'];
if (empty($customer) || $customer['customerid'] != $customerid) {
standard_error('customerdoesntexist', '', true);
}
if ($this->getUserDetail('customers_see_all') == '1') {
$admin_stmt = Database::prepare("
SELECT * FROM `" . TABLE_PANEL_ADMINS . "`
@@ -194,10 +190,6 @@ class Domains extends ApiCommand implements ResourceEntity
$admin = Database::pexecute_first($admin_stmt, array(
'adminid' => $adminid
), true, true);
if (empty($admin) || $admin['adminid'] != $adminid) {
standard_error('admindoesntexist', '', true);
}
} else {
$adminid = $this->getUserDetail('adminid');
$admin = $this->getUserData();