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

@@ -25,6 +25,9 @@ class MailsTest extends TestCase
{
global $admin_userdata;
// set domains as hidden to test whether the internal flag works
Settings::Set('panel.customer_hide_options', 'domains', true);
// get customer
$json_result = Customers::getLocal($admin_userdata, array(
'loginname' => 'test1'
@@ -39,6 +42,9 @@ class MailsTest extends TestCase
$result = json_decode($json_result, true)['data'];
$this->assertEquals("info@test2.local", $result['email_full']);
$this->assertEquals(0, $result['iscatchall']);
// reset setting
Settings::Set('panel.customer_hide_options', '', true);
}
public function testAdminEmailsAdd()