new setting to select default value of 'allow api access' for new customers; fixes #1087
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
@@ -298,7 +298,7 @@ class Customers extends ApiCommand implements ResourceEntity
|
||||
$fax = $this->getParam('fax', true, '');
|
||||
$customernumber = $this->getParam('customernumber', true, '');
|
||||
$def_language = $this->getParam('def_language', true, Settings::Get('panel.standardlanguage'));
|
||||
$api_allowed = $this->getBoolParam('api_allowed', true, Settings::Get('api.enabled'));
|
||||
$api_allowed = $this->getBoolParam('api_allowed', true, (Settings::Get('api.enabled') && Settings::Get('api.customer_default')));
|
||||
$gender = (int)$this->getParam('gender', true, 0);
|
||||
$custom_notes = $this->getParam('custom_notes', true, '');
|
||||
$custom_notes_show = $this->getBoolParam('custom_notes_show', true, 0);
|
||||
|
||||
@@ -34,7 +34,7 @@ final class Froxlor
|
||||
const VERSION = '2.0.10';
|
||||
|
||||
// Database version (YYYYMMDDC where C is a daily counter)
|
||||
const DBVERSION = '202301180';
|
||||
const DBVERSION = '202302030';
|
||||
|
||||
// Distribution branding-tag (used for Debian etc.)
|
||||
const BRANDING = '';
|
||||
|
||||
@@ -87,7 +87,7 @@ return [
|
||||
'desc' => lng('usersettings.api_allowed.description'),
|
||||
'type' => 'checkbox',
|
||||
'value' => '1',
|
||||
'checked' => Settings::Get('api.enabled') == '1',
|
||||
'checked' => Settings::Get('api.enabled') == '1' && Settings::Get('api.customer_default'),
|
||||
'visible' => Settings::Get('api.enabled') == '1'
|
||||
]
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user