Show error notice when email is sent from unauthorized email
[MAILPOET-1787]
This commit is contained in:
@@ -73,6 +73,7 @@ class Menu {
|
||||
$this->subscribers_over_limit = $subscribers_feature->check();
|
||||
$this->checkMailPoetAPIKey();
|
||||
$this->checkPremiumKey();
|
||||
$this->checkFromEmailAuthorization();
|
||||
|
||||
add_action(
|
||||
'admin_menu',
|
||||
@@ -836,6 +837,13 @@ class Menu {
|
||||
$this->premium_key_valid = $checker->isPremiumKeyValid($show_notices);
|
||||
}
|
||||
|
||||
function checkFromEmailAuthorization(ServicesChecker $checker = null) {
|
||||
if (self::isOnMailPoetAdminPage()) {
|
||||
$checker = $checker ?: new ServicesChecker();
|
||||
$checker->isFromEmailAuthorized(true);
|
||||
}
|
||||
}
|
||||
|
||||
function getLimitPerPage($model = null) {
|
||||
if ($model === null) {
|
||||
return Listing\Handler::DEFAULT_LIMIT_PER_PAGE;
|
||||
|
Reference in New Issue
Block a user