mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-19 07:12:26 +02:00
N°5102 - Allow to send emails using GSuite SMTP and OAuth - Highlight classes
This commit is contained in:
@@ -14,14 +14,16 @@ class ApplicationUIExtension extends AbstractApplicationUIExtension
|
|||||||
|
|
||||||
public function GetHilightClass($oObject)
|
public function GetHilightClass($oObject)
|
||||||
{
|
{
|
||||||
// Possible return values are:
|
if ($oObject instanceof OAuthClient) {
|
||||||
// HILIGHT_CLASS_CRITICAL, HILIGHT_CLASS_WARNING, HILIGHT_CLASS_OK, HILIGHT_CLASS_NONE
|
// Possible return values are:
|
||||||
$oConfig = utils::GetConfig();
|
// HILIGHT_CLASS_CRITICAL, HILIGHT_CLASS_WARNING, HILIGHT_CLASS_OK, HILIGHT_CLASS_NONE
|
||||||
$aScopes = $oObject->Get('scope')->GetValues();
|
$oConfig = utils::GetConfig();
|
||||||
if ($oObject->Get('status') == 'inactive') {
|
$aScopes = $oObject->Get('scope')->GetValues();
|
||||||
return HILIGHT_CLASS_WARNING;
|
if ($oObject->Get('status') == 'inactive') {
|
||||||
} elseif (in_array('SMTP', $aScopes) && $oConfig->Get('email_transport_smtp.username') == $oObject->Get('name')) {
|
return HILIGHT_CLASS_WARNING;
|
||||||
return HILIGHT_CLASS_OK;
|
} elseif (in_array('SMTP', $aScopes) && $oConfig->Get('email_transport_smtp.username') == $oObject->Get('name')) {
|
||||||
|
return HILIGHT_CLASS_OK;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return HILIGHT_CLASS_NONE;
|
return HILIGHT_CLASS_NONE;
|
||||||
|
|||||||
Reference in New Issue
Block a user