enable internal api-call to bypass customer_hide_options check in certain situations where it is needed, fixes #803

Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann
2020-05-15 09:35:20 +02:00
parent edc702dafa
commit bddf9b496c
5 changed files with 46 additions and 15 deletions

View File

@@ -409,7 +409,7 @@ class SubDomains extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resourc
);
}
} else {
if (Settings::IsInList('panel.customer_hide_options', 'domains')) {
if (! $this->isInternal() && Settings::IsInList('panel.customer_hide_options', 'domains')) {
throw new \Exception("You cannot access this resource", 405);
}
$result_stmt = Database::prepare("