diff --git a/datamodels/2.x/itop-oauth-client/module.itop-oauth-client.php b/datamodels/2.x/itop-oauth-client/module.itop-oauth-client.php index e0c681df8..c58cc1af0 100644 --- a/datamodels/2.x/itop-oauth-client/module.itop-oauth-client.php +++ b/datamodels/2.x/itop-oauth-client/module.itop-oauth-client.php @@ -26,6 +26,7 @@ SetupWebPage::AddModule( 'vendor/autoload.php', 'model.itop-oauth-client.php', // Contains the PHP code generated by the "compilation" of datamodel.remote-authent-oauth.xml 'src/Service/PopupMenuExtension.php', + 'src/Service/ApplicationUIExtension.php', ), 'webservice' => array( diff --git a/datamodels/2.x/itop-oauth-client/src/Service/ApplicationUIExtension.php b/datamodels/2.x/itop-oauth-client/src/Service/ApplicationUIExtension.php new file mode 100644 index 000000000..80135ed2f --- /dev/null +++ b/datamodels/2.x/itop-oauth-client/src/Service/ApplicationUIExtension.php @@ -0,0 +1,29 @@ +Get('scope')->GetValues(); + if ($oObject->Get('status') == 'inactive') { + return HILIGHT_CLASS_WARNING; + } elseif (in_array('SMTP', $aScopes) && $oConfig->Get('email_transport_smtp.username') == $oObject->Get('name')) { + return HILIGHT_CLASS_OK; + } + + return HILIGHT_CLASS_NONE; + } +} \ No newline at end of file