Fix license validation support for the actions by email feature

This commit is contained in:
Gustavo Cruz
2015-03-10 16:32:57 -04:00
parent ff73432671
commit d7380b182e
6 changed files with 42 additions and 19 deletions

View File

@@ -29,5 +29,30 @@ class System extends Api
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
}
}
}
/**
* @return array
*
* @author Gustavo Cruz <gustavo.cruz@colosa.com>
* @copyright Colosa - Bolivia
*
* @url GET /enabled-features
*/
public function doGetEnabledFeatures()
{
try {
$enabledFeatures = [];
$keys = array ('zLhSk5TeEQrNFI2RXFEVktyUGpnczV1WEJNWVp6cjYxbTU3R29mVXVZNWhZQT0=');
foreach ($keys as $key) {
if (\PMLicensedFeatures
::getSingleton()
->verifyfeature($key)) {
$enabledFeatures[] = $key;
}
}
return $enabledFeatures;
} catch (\Exception $e) {
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
}
}
}