firmware: extend messages for subscription errors; closes #6373

This commit is contained in:
Franco Fichtner 2023-03-21 08:37:13 +01:00
parent 4ef3c1fbe8
commit c02198fa58

View File

@ -287,7 +287,7 @@ class FirmwareController extends ApiMutableModelControllerBase
$response['status_msg'] = gettext('Could not verify the repository fingerprint.');
$response['status'] = 'error';
} elseif (array_key_exists('repository', $response) && $response['repository'] == 'forbidden') {
$response['status_msg'] = $subscription ? gettext('The provided subscription is invalid.') : gettext('The repository did not grant access.');
$response['status_msg'] = $subscription ? gettext('The provided subscription is either invalid or expired. Please make sure the input is correct. Otherwise contact sales or visit the online shop to obtain a valid one.') : gettext('The repository did not grant access.');
$response['status'] = 'error';
} elseif (array_key_exists('repository', $response) && $response['repository'] == 'revoked') {
$response['status_msg'] = gettext('The repository fingerprint has been revoked.');
@ -299,7 +299,7 @@ class FirmwareController extends ApiMutableModelControllerBase
$response['status_msg'] = sprintf(gettext('The release type "%s" is not available on this repository.'), $response['product_target']);
$response['status'] = 'error';
} elseif (array_key_exists('repository', $response) && $response['repository'] != 'ok') {
$response['status_msg'] = $subscription ? sprintf(gettext('The matching %s %s series does not yet exist.'), $response['product']['product_name'], $response['product_abi']) : gettext('Could not find the repository on the selected mirror.');
$response['status_msg'] = $subscription ? sprintf(gettext('The matching %s %s series does not yet exist. Images are available to switch this installation to the latest business edition.'), $response['product']['product_name'], $response['product_abi']) : gettext('Could not find the repository on the selected mirror.');
$response['status'] = 'error';
} elseif ($active_count) {
if ($active_count == 1) {