Merge branch 'ent-7709-registro-de-licencias-trial-en-um' into 'develop'
Avoid trial users from using UMC See merge request artica/pandorafms!4249
This commit is contained in:
commit
736d2f7d77
|
@ -69,6 +69,13 @@ if (empty($license) === true) {
|
||||||
$license = 'PANDORA-FREE';
|
$license = 'PANDORA-FREE';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$mode_str = '';
|
||||||
|
if ($mode === Manager::MODE_ONLINE) {
|
||||||
|
$mode_str = 'online';
|
||||||
|
} else if ($mode === Manager::MODE_OFFLINE) {
|
||||||
|
$mode_str = 'offline';
|
||||||
|
}
|
||||||
|
|
||||||
if (function_exists('enterprise_hook') === true) {
|
if (function_exists('enterprise_hook') === true) {
|
||||||
enterprise_include_once('/include/functions_license.php');
|
enterprise_include_once('/include/functions_license.php');
|
||||||
$license_data = enterprise_hook('license_get_info');
|
$license_data = enterprise_hook('license_get_info');
|
||||||
|
@ -93,13 +100,6 @@ if (function_exists('enterprise_hook') === true) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($days_to_expiry < 0) {
|
if ($days_to_expiry < 0) {
|
||||||
$mode_str = '';
|
|
||||||
if ($mode === Manager::MODE_ONLINE) {
|
|
||||||
$mode_str = 'online';
|
|
||||||
} else if ($mode === Manager::MODE_OFFLINE) {
|
|
||||||
$mode_str = 'offline';
|
|
||||||
}
|
|
||||||
|
|
||||||
ui_print_warning_message(
|
ui_print_warning_message(
|
||||||
__(
|
__(
|
||||||
'You cannot use update manager %s. This license has expired %d days ago. Please update your license or disable enterprise section by moving enterprise directory to another location and try again.',
|
'You cannot use update manager %s. This license has expired %d days ago. Please update your license or disable enterprise section by moving enterprise directory to another location and try again.',
|
||||||
|
@ -109,6 +109,24 @@ if (function_exists('enterprise_hook') === true) {
|
||||||
);
|
);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (rtrim($license_data['licensed_to']) === Manager::PANDORA_TRIAL_ISSUER) {
|
||||||
|
if (function_exists('get_product_name') === true) {
|
||||||
|
$product_name = get_product_name();
|
||||||
|
} else {
|
||||||
|
$product_name = 'Pandora FMS';
|
||||||
|
}
|
||||||
|
|
||||||
|
ui_print_info_message(
|
||||||
|
__(
|
||||||
|
'You cannot use update manager %s. This license is a trial license to test all %s features. Please update your license to unlock all %s features.',
|
||||||
|
$mode_str,
|
||||||
|
$product_name,
|
||||||
|
$product_name
|
||||||
|
)
|
||||||
|
);
|
||||||
|
return;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
$license_data = [];
|
$license_data = [];
|
||||||
$license_data['count_enabled'] = db_get_value(
|
$license_data['count_enabled'] = db_get_value(
|
||||||
|
|
|
@ -40,6 +40,7 @@ class Manager
|
||||||
const MODE_ONLINE = 0;
|
const MODE_ONLINE = 0;
|
||||||
const MODE_OFFLINE = 1;
|
const MODE_OFFLINE = 1;
|
||||||
const MODE_REGISTER = 2;
|
const MODE_REGISTER = 2;
|
||||||
|
const PANDORA_TRIAL_ISSUER = 'Enterprise Trial License(Pandora FMS <info@pandorafms.com>)';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Current mode (view).
|
* Current mode (view).
|
||||||
|
|
Loading…
Reference in New Issue