diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 2d03f2bdb..2d60aad3d 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -111,9 +111,9 @@ Our tests are located in the `test/` directory, containing a PHPUnit config file
* Use the present tense ("Add feature" not "Added feature")
* Use the imperative mood ("Move cursor to..." not "Moves cursor to...")
* Limit the first line to 72 characters or less
-* Please start the commit message with an applicable emoji code (following the [Gitmoji guide](https://gitmoji.carloscuesta.me/)).
- Beware to use the code (for example `:bug:`) and not the character (đ) as Unicode support in git clients is very poor for now...
- Emoji examples :
+* Please start the commit message with an applicable emoji code (following the [Gitmoji guide](https://gitmoji.dev/)).
+ Beware to use the code (for example `:bug:`) and not the character (đ) as Unicode support in git clients is very poor for now...
+ Emoji examples :
* đ `:globe_with_meridians:` for translations
* đš `:art:` when improving the format/structure of the code
* âĄïž `:zap:` when improving performance
diff --git a/composer.json b/composer.json
index 300b14874..9f9c7752d 100644
--- a/composer.json
+++ b/composer.json
@@ -1,6 +1,8 @@
{
+ "name": "combodo/itop",
+ "description": "IT Operations Portal",
"type": "project",
- "license": "AGPLv3",
+ "license": "AGPL-3.0-or-later",
"require": {
"php": ">=7.1.3 <8.0.0",
"ext-ctype": "*",
diff --git a/core/asynctask.class.inc.php b/core/asynctask.class.inc.php
index 5c7d329bf..70b3d1fb0 100644
--- a/core/asynctask.class.inc.php
+++ b/core/asynctask.class.inc.php
@@ -293,7 +293,7 @@ abstract class AsyncTask extends DBObject
$this->Set('remaining_retries', $this->GetMaxRetries($iErrorCode));
}
- $this->Set('last_error', $sErrorMessage);
+ $this->SetTrim('last_error', $sErrorMessage);
$this->Set('last_error_code', $iErrorCode); // Note: can be ZERO !!!
$this->Set('last_attempt', time());
diff --git a/core/config.class.inc.php b/core/config.class.inc.php
index 856e78629..732bd4d86 100644
--- a/core/config.class.inc.php
+++ b/core/config.class.inc.php
@@ -530,7 +530,7 @@ class Config
],
'email_transport' => [
'type' => 'string',
- 'description' => 'Mean to send emails: PHPMail (uses the function mail()) or SMTP (implements the client protocol)',
+ 'description' => 'Mean to send emails: PHPMail (uses the function mail()), SMTP (implements the client protocol) or SMTP_OAuth (connect to the server using OAuth 2.0)',
'default' => "PHPMail",
'value' => "PHPMail",
'source_of_value' => '',
diff --git a/datamodels/2.x/itop-oauth-client/README.md b/datamodels/2.x/itop-oauth-client/README.md
index a520ac75c..9a45ad911 100644
--- a/datamodels/2.x/itop-oauth-client/README.md
+++ b/datamodels/2.x/itop-oauth-client/README.md
@@ -1,2 +1,5 @@
# Extension OAuth 2.0 client
+## GMail
+
+If the account is in test, after 7 days the tokens are no longer valid, you have to renew the tokens manually.
diff --git a/datamodels/2.x/itop-oauth-client/ajax.php b/datamodels/2.x/itop-oauth-client/ajax.php
index 1b81b0829..4fbbbf477 100644
--- a/datamodels/2.x/itop-oauth-client/ajax.php
+++ b/datamodels/2.x/itop-oauth-client/ajax.php
@@ -17,8 +17,7 @@ if (version_compare(ITOP_DESIGN_LATEST_VERSION , '3.0') >= 0) {
}
$oUpdateController = new AjaxOauthClientController($sTemplates, 'itop-oauth-client');
-$oUpdateController->AllowOnlyAdmin();
-$oUpdateController->SetDefaultOperation('CreateMailbox');
+$oUpdateController->SetMenuId('OAuthClient');
$oUpdateController->HandleOperation();
diff --git a/datamodels/2.x/itop-oauth-client/datamodel.itop-oauth-client.xml b/datamodels/2.x/itop-oauth-client/datamodel.itop-oauth-client.xml
index 31c7b2f77..d9ebd265b 100644
--- a/datamodels/2.x/itop-oauth-client/datamodel.itop-oauth-client.xml
+++ b/datamodels/2.x/itop-oauth-client/datamodel.itop-oauth-client.xml
@@ -5,7 +5,7 @@
cmdbAbstractObject
- cloud,searchable
+ grant_by_profile,application
true
autoincrement
priv_oauth_client
@@ -119,22 +119,21 @@
public
Overload-DBObject
Get('scope');
- if ($this->Get('status') == 'inactive') {
- $oPage->p(''.Dict::S('itop-oauth-client:Message:MissingToken').'');
- } elseif (($sScope == 'SMTP' || $sScope == 'EMail') && $oConfig->Get('email_transport_smtp.username') == $this->Get('name')) {
- $sLabel = Dict::S('itop-oauth-client:UsedForSMTP');
- $sTestLabel = Dict::S('itop-oauth-client:TestSMTP');
- $sTestURL = utils::GetAbsoluteUrlAppRoot().'setup/email.test.php';
- $oPage->p("$sLabel $sTestLabel");
- }
- }
- }
+ public function DisplayBareHeader(WebPage $oPage, $bEditMode = false)
+ {
+ parent::DisplayBareHeader($oPage, $bEditMode);
+ if (!$bEditMode) {
+ $oConfig = utils::GetConfig();
+ if ($this->Get('status') == 'inactive') {
+ $oPage->p(''.Dict::S('itop-oauth-client:Message:MissingToken').'');
+ } elseif ($this->Get('used_for_smtp') == 'yes' && $oConfig->Get('email_transport_smtp.username') == $this->Get('name')) {
+ $sLabel = Dict::S('itop-oauth-client:UsedForSMTP');
+ $sTestLabel = Dict::S('itop-oauth-client:TestSMTP');
+ $sTestURL = utils::GetAbsoluteUrlAppRoot().'setup/email.test.php';
+ $oPage->p("$sLabel $sTestLabel");
+ }
+ }
+ }
]]>
@@ -142,14 +141,14 @@
public
Overload-DBObject
@@ -157,68 +156,68 @@
public
Overload-DBObject
false
public
Get('provider').'.com';
- }
+ public function GetDefaultMailServer()
+ {
+ return 'imap.'.$this->Get('provider').'.com';
+ }
]]>
false
public
false
public
Get('status') == 'active') {
- return new \League\OAuth2\Client\Token\AccessToken([
- 'access_token' => $this->Get('token'),
- 'expires_in' => date_format(new DateTime($this->Get('token_expiration')), 'U') - time(),
- 'refresh_token' => $this->Get('refresh_token'),
- 'token_type' => 'Bearer',
- ]);
- }
- return null;
- }
+ public function GetAccessToken()
+ {
+ if ($this->Get('status') == 'active') {
+ return new \League\OAuth2\Client\Token\AccessToken([
+ 'access_token' => $this->Get('token'),
+ 'expires_in' => date_format(new DateTime($this->Get('token_expiration')), 'U') - time(),
+ 'refresh_token' => $this->Get('refresh_token'),
+ 'token_type' => 'Bearer',
+ ]);
+ }
+ return null;
+ }
]]>
false
public
Set('token', $oAccessToken->getToken());
- $this->Set('token_expiration', date(AttributeDateTime::GetSQLFormat(), $oAccessToken->getExpires()));
- if (!empty($oAccessToken->getRefreshToken())) {
- $this->Set('refresh_token', $oAccessToken->getRefreshToken());
- }
- $this->Set('status', 'active');
- $this->DBUpdate();
- }
+ public function SetAccessToken(\League\OAuth2\Client\Token\AccessTokenInterface $oAccessToken)
+ {
+ $this->Set('token', $oAccessToken->getToken());
+ $this->Set('token_expiration', date(AttributeDateTime::GetSQLFormat(), $oAccessToken->getExpires()));
+ if (!empty($oAccessToken->getRefreshToken())) {
+ $this->Set('refresh_token', $oAccessToken->getRefreshToken());
+ }
+ $this->Set('status', 'active');
+ $this->DBUpdate();
+ }
]]>
@@ -280,6 +279,606 @@
+
+ OAuthClient
+
+ grant_by_profile,application
+ false
+ autoincrement
+ priv_oauth_client_azure
+ id
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+ true
+
+ SMTP
+ IMAP
+
+ scope
+ SMTP,IMAP
+ true
+
+
+ advanced_scope
+
+ true
+
+
+ true
+
+ simple
+ advanced
+
+ used_scope
+ simple
+ false
+
+
+
+
+
+
+ true
+
+ yes
+ no
+
+ used_for_smtp
+ no
+ true
+
+
+
+
+
+ -
+ 10
+
+
-
+ 10
+
+
-
+ 10
+
+ -
+ 20
+
+ -
+ 30
+
+ -
+ 40
+
+ -
+ 50
+
+ -
+ 60
+
+ -
+ 70
+
+ -
+ 80
+
+
+
+
+
+ -
+ 20
+
+
-
+ 10
+
+
-
+ 10
+
+ -
+ 20
+
+ -
+ 30
+
+ -
+ 40
+
+
+
+
+
+
+
+
+
+ -
+ 10
+
+ -
+ 10
+
+
+
+
+
+ -
+ 10
+
+ -
+ 10
+
+ -
+ 10
+
+
+
+
+
+
+ false
+ public
+ Overload-DBObject
+ Set('provider', 'Azure');
+ $this->Set('redirect_url', Combodo\iTop\Core\Authentication\Client\OAuth\OAuthClientProviderFactory::GetRedirectUri());
+ $this->Set('scope', 'SMTP, IMAP');
+
+ parent::PrefillCreationForm($aContextParam);
+ }
+ ]]>
+
+
+ false
+ public
+ Overload-DBObject
+ ListChanges();
+ if (array_key_exists('name', $aChanges) || array_key_exists('used_for_smtp', $aChanges))
+ {
+ $sNewName = $this->Get('name');
+ $sNewUseForSMTP = $this->Get('used_for_smtp');
+ if ($sNewUseForSMTP == 'yes') {
+ $oSearch = DBObjectSearch::FromOQL_AllData("SELECT OAuthClientGoogle WHERE name = :newname AND used_for_smtp = :newuseforsmtp AND id != :id UNION SELECT OAuthClientAzure WHERE name = :newname AND used_for_smtp = :newuseforsmtp AND id != :id");
+ $oSet = new DBObjectSet($oSearch, array(), ['id' => $this->GetKey(), 'newname' => $sNewName, 'newuseforsmtp' => $sNewUseForSMTP]);
+ if ($oSet->Count() > 0)
+ {
+ $this->m_aCheckIssues[] = Dict::Format('OAuthClient:Name/UseForSMTPMustBeUnique', $sNewName, $sNewUseForSMTP);
+ }
+ }
+ }
+ } ]]>
+
+
+ false
+ public
+ Overload-DBObject
+ Get('provider'))) {
+ $this->Set('provider', 'Azure');
+ }
+ if (empty($this->Get('redirect_url'))) {
+ $this->Set('redirect_url', Combodo\iTop\Core\Authentication\Client\OAuth\OAuthClientProviderFactory::GetRedirectUri());
+ }
+ if (empty($this->Get('advanced_scope'))) {
+ $this->Set('used_scope', 'simple');
+ if (count($this->Get('scope')->GetValues()) == 0) {
+ $this->Set('scope', 'SMTP, IMAP');
+ }
+ } else {
+ $this->Set('used_scope', 'advanced');
+ $this->Set('scope', '');
+ }
+ }
+ ]]>
+
+
+ false
+ public
+ Overload-DBObject
+
+
+
+ false
+ public
+ Overload-DBObject
+
+
+
+ false
+ public
+
+
+
+ false
+ public
+ Get('advanced_scope'))) {
+ return $this->Get('advanced_scope');
+ }
+ $aScopes = $this->Get('scope')->GetValues();
+ $aRawScopes = ['offline_access'];
+ foreach ($aScopes as $sScope) {
+ switch ($sScope) {
+ case 'SMTP':
+ $aRawScopes[] = 'https://outlook.office.com/SMTP.Send';
+ break;
+
+ case 'IMAP':
+ $aRawScopes[] = 'https://outlook.office.com/IMAP.AccessAsUser.All';
+ break;
+ }
+ }
+ return implode(' ', $aRawScopes);
+ }
+ ]]>
+
+
+
+
+ OAuthClient
+
+ grant_by_profile,application
+ false
+ autoincrement
+ priv_oauth_client_google
+ id
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+ true
+
+ SMTP
+ IMAP
+
+ scope
+ SMTP,IMAP
+ true
+
+
+ advanced_scope
+
+ true
+
+
+ true
+
+ simple
+ advanced
+
+ used_scope
+ simple
+ false
+
+
+
+
+
+
+ true
+
+ yes
+ no
+
+ used_for_smtp
+ no
+ true
+
+
+
+
+
+ -
+ 10
+
+
-
+ 10
+
+
-
+ 10
+
+ -
+ 20
+
+ -
+ 30
+
+ -
+ 40
+
+ -
+ 50
+
+ -
+ 60
+
+ -
+ 70
+
+ -
+ 80
+
+
+
+
+
+ -
+ 20
+
+
-
+ 10
+
+
-
+ 10
+
+ -
+ 20
+
+ -
+ 30
+
+ -
+ 40
+
+
+
+
+
+
+
+
+
+ -
+ 10
+
+ -
+ 10
+
+
+
+
+
+ -
+ 10
+
+ -
+ 10
+
+ -
+ 10
+
+
+
+
+
+
+ false
+ public
+ Overload-DBObject
+ Set('provider', 'Google');
+ $this->Set('redirect_url', Combodo\iTop\Core\Authentication\Client\OAuth\OAuthClientProviderFactory::GetRedirectUri());
+ $this->Set('scope', 'SMTP, IMAP');
+
+ parent::PrefillCreationForm($aContextParam);
+ }
+ ]]>
+
+
+ false
+ public
+ Overload-DBObject
+ ListChanges();
+ if (array_key_exists('name', $aChanges) || array_key_exists('used_for_smtp', $aChanges))
+ {
+ $sNewName = $this->Get('name');
+ $sNewUseForSMTP = $this->Get('used_for_smtp');
+ if ($sNewUseForSMTP == 'yes') {
+ $oSearch = DBObjectSearch::FromOQL_AllData("SELECT OAuthClientGoogle WHERE name = :newname AND used_for_smtp = :newuseforsmtp AND id != :id UNION SELECT OAuthClientAzure WHERE name = :newname AND used_for_smtp = :newuseforsmtp AND id != :id");
+ $oSet = new DBObjectSet($oSearch, array(), ['id' => $this->GetKey(), 'newname' => $sNewName, 'newuseforsmtp' => $sNewUseForSMTP]);
+ if ($oSet->Count() > 0)
+ {
+ $this->m_aCheckIssues[] = Dict::Format('OAuthClient:Name/UseForSMTPMustBeUnique', $sNewName, $sNewUseForSMTP);
+ }
+ }
+ }
+ } ]]>
+
+
+ false
+ public
+ Overload-DBObject
+ Get('provider'))) {
+ $this->Set('provider', 'Google');
+ }
+ if (empty($this->Get('redirect_url'))) {
+ $this->Set('redirect_url', Combodo\iTop\Core\Authentication\Client\OAuth\OAuthClientProviderFactory::GetRedirectUri());
+ }
+ if (empty($this->Get('advanced_scope'))) {
+ $this->Set('used_scope', 'simple');
+ if (count($this->Get('scope')->GetValues()) == 0) {
+ $this->Set('scope', 'SMTP, IMAP');
+ }
+ } else {
+ $this->Set('used_scope', 'advanced');
+ $this->Set('scope', '');
+ }
+ }
+ ]]>
+
+
+ false
+ public
+ Overload-DBObject
+
+
+
+ false
+ public
+ Overload-DBObject
+
+
+
+ false
+ public
+
+
+
+ false
+ public
+ Get('advanced_scope'))) {
+ return $this->Get('advanced_scope');
+ }
+ $aScopes = $this->Get('scope')->GetValues();
+ $aRawScopes = [];
+ foreach ($aScopes as $sScope) {
+ switch ($sScope) {
+ case 'SMTP':
+ $aRawScopes['https://mail.google.com/'] = 'https://mail.google.com/';
+ break;
+
+ case 'IMAP':
+ $aRawScopes['https://mail.google.com/'] = 'https://mail.google.com/';
+ break;
+ }
+ }
+ return implode(' ', $aRawScopes);
+ }
+ ]]>
+
+
+
+
+
+
+
+
diff --git a/datamodels/2.x/itop-oauth-client/en.dict.itop-oauth-client.php b/datamodels/2.x/itop-oauth-client/en.dict.itop-oauth-client.php
index 1a91fb173..a8a0f4d9d 100644
--- a/datamodels/2.x/itop-oauth-client/en.dict.itop-oauth-client.php
+++ b/datamodels/2.x/itop-oauth-client/en.dict.itop-oauth-client.php
@@ -21,6 +21,11 @@ Dict::Add('EN US', 'English', 'English', [
'itop-oauth-client:Message:MissingToken' => 'Generate access token before using this OAuth client',
'itop-oauth-client:Message:TokenCreated' => 'Access token created',
'itop-oauth-client:Message:TokenRecreated' => 'Access token regenerated',
+
+ 'OAuthClient:Name/UseForSMTPMustBeUnique' => 'The combination Login (%1$s) and Use for SMTP (%2$s) has already be used for OAuth Client',
+
+ 'OAuthClient:baseinfo' => 'Base Information',
+ 'OAuthClient:scope' => 'Scope',
]);
//
@@ -32,19 +37,17 @@ Dict::Add('EN US', 'English', 'English', [
'Class:OAuthClient/Attribute:provider' => 'Provider',
'Class:OAuthClient/Attribute:provider+' => '',
'Class:OAuthClient/Attribute:name' => 'Login',
- 'Class:OAuthClient/Attribute:name+' => '',
- 'Class:OAuthClient/Attribute:scope' => 'Scope',
- 'Class:OAuthClient/Attribute:scope+' => '',
+ 'Class:OAuthClient/Attribute:name+' => 'In general, this is your email address',
'Class:OAuthClient/Attribute:status' => 'Status',
- 'Class:OAuthClient/Attribute:status+' => '',
+ 'Class:OAuthClient/Attribute:status+' => 'After creation, use the action âGenerate access tokenâ to be able to use this OAuth client',
'Class:OAuthClient/Attribute:status/Value:active' => 'Access token generated',
'Class:OAuthClient/Attribute:status/Value:inactive' => 'No Access token',
'Class:OAuthClient/Attribute:description' => 'Description',
'Class:OAuthClient/Attribute:description+' => '',
'Class:OAuthClient/Attribute:client_id' => 'Client id',
- 'Class:OAuthClient/Attribute:client_id+' => '',
+ 'Class:OAuthClient/Attribute:client_id+' => 'A long string of characters provided by your OAuth2 provider',
'Class:OAuthClient/Attribute:client_secret' => 'Client secret',
- 'Class:OAuthClient/Attribute:client_secret+' => '',
+ 'Class:OAuthClient/Attribute:client_secret+' => 'Another long string of characters provided by your OAuth2 provider',
'Class:OAuthClient/Attribute:refresh_token' => 'Refresh token',
'Class:OAuthClient/Attribute:refresh_token+' => '',
'Class:OAuthClient/Attribute:refresh_token_expiration' => 'Refresh token expiration',
@@ -54,7 +57,7 @@ Dict::Add('EN US', 'English', 'English', [
'Class:OAuthClient/Attribute:token_expiration' => 'Access token expiration',
'Class:OAuthClient/Attribute:token_expiration+' => '',
'Class:OAuthClient/Attribute:redirect_url' => 'Redirect url',
- 'Class:OAuthClient/Attribute:redirect_url+' => '',
+ 'Class:OAuthClient/Attribute:redirect_url+' => 'This url must be copied in the OAuth2 configuration of the provider',
'Class:OAuthClient/Attribute:mailbox_list' => 'Mailbox list',
'Class:OAuthClient/Attribute:mailbox_list+' => '',
]);
@@ -62,17 +65,53 @@ Dict::Add('EN US', 'English', 'English', [
//
// Class: OAuthClientAzure
//
-Dict::Add('EN US', 'English', 'English', [
+
+Dict::Add('EN US', 'English', 'English', array(
'Class:OAuthClientAzure' => 'OAuth client for Microsoft Azure',
'Class:OAuthClientAzure/Name' => '%1$s (%2$s)',
-
-]);
+ 'Class:OAuthClientAzure/Attribute:scope' => 'Scope',
+ 'Class:OAuthClientAzure/Attribute:scope+' => 'Usually default selection is appropriate',
+ 'Class:OAuthClientAzure/Attribute:scope/Value:SMTP' => 'SMTP',
+ 'Class:OAuthClientAzure/Attribute:scope/Value:SMTP+' => '',
+ 'Class:OAuthClientAzure/Attribute:scope/Value:IMAP' => 'IMAP',
+ 'Class:OAuthClientAzure/Attribute:scope/Value:IMAP+' => '',
+ 'Class:OAuthClientAzure/Attribute:advanced_scope' => 'Advanced scope',
+ 'Class:OAuthClientAzure/Attribute:advanced_scope+' => 'As soon as you enter something here it takes precedence on the âScopeâ selection which is then ignored',
+ 'Class:OAuthClientAzure/Attribute:used_scope' => 'Used scope',
+ 'Class:OAuthClientAzure/Attribute:used_scope+' => '',
+ 'Class:OAuthClientAzure/Attribute:used_scope/Value:simple' => 'Simple',
+ 'Class:OAuthClientAzure/Attribute:used_scope/Value:simple+' => '',
+ 'Class:OAuthClientAzure/Attribute:used_scope/Value:advanced' => 'Advanced',
+ 'Class:OAuthClientAzure/Attribute:used_scope/Value:advanced+' => '',
+ 'Class:OAuthClientAzure/Attribute:used_for_smtp' => 'Used for SMTP',
+ 'Class:OAuthClientAzure/Attribute:used_for_smtp+' => 'At least one OAuth client must have this flag to âYesâ, if you want iTop to use it for sending mails',
+ 'Class:OAuthClientAzure/Attribute:used_for_smtp/Value:yes' => 'Yes',
+ 'Class:OAuthClientAzure/Attribute:used_for_smtp/Value:no' => 'No',
+));
//
// Class: OAuthClientGoogle
//
-Dict::Add('EN US', 'English', 'English', [
+
+Dict::Add('EN US', 'English', 'English', array(
'Class:OAuthClientGoogle' => 'OAuth client for Google',
'Class:OAuthClientGoogle/Name' => '%1$s (%2$s)',
-]);
-
+ 'Class:OAuthClientGoogle/Attribute:scope' => 'Scope',
+ 'Class:OAuthClientGoogle/Attribute:scope+' => 'Usually default selection is appropriate',
+ 'Class:OAuthClientGoogle/Attribute:scope/Value:SMTP' => 'SMTP',
+ 'Class:OAuthClientGoogle/Attribute:scope/Value:SMTP+' => '',
+ 'Class:OAuthClientGoogle/Attribute:scope/Value:IMAP' => 'IMAP',
+ 'Class:OAuthClientGoogle/Attribute:scope/Value:IMAP+' => '',
+ 'Class:OAuthClientGoogle/Attribute:advanced_scope' => 'Advanced scope',
+ 'Class:OAuthClientGoogle/Attribute:advanced_scope+' => 'As soon as you enter something here it takes precedence on the âScopeâ selection which is then ignored',
+ 'Class:OAuthClientGoogle/Attribute:used_scope' => 'Used scope',
+ 'Class:OAuthClientGoogle/Attribute:used_scope+' => '',
+ 'Class:OAuthClientGoogle/Attribute:used_scope/Value:simple' => 'Simple',
+ 'Class:OAuthClientGoogle/Attribute:used_scope/Value:simple+' => '',
+ 'Class:OAuthClientGoogle/Attribute:used_scope/Value:advanced' => 'Advanced',
+ 'Class:OAuthClientGoogle/Attribute:used_scope/Value:advanced+' => '',
+ 'Class:OAuthClientGoogle/Attribute:used_for_smtp' => 'Used for SMTP',
+ 'Class:OAuthClientGoogle/Attribute:used_for_smtp+' => 'At least one OAuth client must have this flag to âYesâ, if you want iTop to use it for sending mails',
+ 'Class:OAuthClientGoogle/Attribute:used_for_smtp/Value:yes' => 'Yes',
+ 'Class:OAuthClientGoogle/Attribute:used_for_smtp/Value:no' => 'No',
+));
diff --git a/datamodels/2.x/itop-oauth-client/fr.dict.itop-oauth-client.php b/datamodels/2.x/itop-oauth-client/fr.dict.itop-oauth-client.php
index e8461b535..3d5f84836 100644
--- a/datamodels/2.x/itop-oauth-client/fr.dict.itop-oauth-client.php
+++ b/datamodels/2.x/itop-oauth-client/fr.dict.itop-oauth-client.php
@@ -5,6 +5,7 @@
* @copyright Copyright (C) 2013 XXXXX
* @license http://opensource.org/licenses/AGPL-3.0
*/
+
Dict::Add('FR FR', 'French', 'Français', [
'Menu:CreateMailbox' => 'Créer une boite mail...',
'Menu:OAuthClient' => 'Client OAuth',
@@ -20,6 +21,11 @@ Dict::Add('FR FR', 'French', 'Français', [
'itop-oauth-client:Message:MissingToken' => 'Générez le jeton d\'accÚs avant d\'utiliser ce client OAuth',
'itop-oauth-client:Message:TokenCreated' => 'Le jeton d\'accÚs à été créé',
'itop-oauth-client:Message:TokenRecreated' => 'Le jeton d\'accÚs à été renouvelé',
+
+ 'OAuthClient:Name/UseForSMTPMustBeUnique' => 'La combinaison Login (%1$s) and Utilisé pour SMTP (%2$s) a déjà été utilisée pour OAuth Client',
+
+ 'OAuthClient:baseinfo' => 'Information',
+ 'OAuthClient:scope' => 'Scope',
]);
//
@@ -31,15 +37,17 @@ Dict::Add('FR FR', 'French', 'Français', [
'Class:OAuthClient/Attribute:provider' => 'Fournisseur',
'Class:OAuthClient/Attribute:provider+' => '',
'Class:OAuthClient/Attribute:name' => 'Login',
- 'Class:OAuthClient/Attribute:name+' => '',
- 'Class:OAuthClient/Attribute:scope' => 'Niveaux d\'accĂšs',
- 'Class:OAuthClient/Attribute:scope+' => '',
+ 'Class:OAuthClient/Attribute:name+' => 'L\'adresse email Ă utiliser chez ce fournisseur',
+ 'Class:OAuthClient/Attribute:status' => 'Statut',
+ 'Class:OAuthClient/Attribute:status+' => 'AprÚs la création, effectuer l\'action \'Créer un jeton d\'accÚs...\' pour activer ce client OAuth',
+ 'Class:OAuthClient/Attribute:status/Value:active' => 'Jeton d\'accÚs créé',
+ 'Class:OAuthClient/Attribute:status/Value:inactive' => 'Pas de jeton d\'accĂšs',
'Class:OAuthClient/Attribute:description' => 'Description',
'Class:OAuthClient/Attribute:description+' => '',
'Class:OAuthClient/Attribute:client_id' => 'ID Client',
- 'Class:OAuthClient/Attribute:client_id+' => '',
+ 'Class:OAuthClient/Attribute:client_id+' => 'Recopier la chaine fournie par votre fournisseur OAuth2',
'Class:OAuthClient/Attribute:client_secret' => 'Code secret du client',
- 'Class:OAuthClient/Attribute:client_secret+' => '',
+ 'Class:OAuthClient/Attribute:client_secret+' => 'Recopier l\'information fournie par votre fournisseur OAuth2',
'Class:OAuthClient/Attribute:refresh_token' => 'Jeton de renouvellement',
'Class:OAuthClient/Attribute:refresh_token+' => '',
'Class:OAuthClient/Attribute:refresh_token_expiration' => 'Date d\'expiration du jeton de renouvellement',
@@ -49,7 +57,7 @@ Dict::Add('FR FR', 'French', 'Français', [
'Class:OAuthClient/Attribute:token_expiration' => 'Date d\'expiration du jeton d\'accĂšs',
'Class:OAuthClient/Attribute:token_expiration+' => '',
'Class:OAuthClient/Attribute:redirect_url' => 'URL de redirection',
- 'Class:OAuthClient/Attribute:redirect_url+' => '',
+ 'Class:OAuthClient/Attribute:redirect_url+' => 'Cet URL doit ĂȘtre recopiĂ© dans la configuration OAuth2 de votre fournisseur',
'Class:OAuthClient/Attribute:mailbox_list' => 'Mailbox list',
'Class:OAuthClient/Attribute:mailbox_list+' => '',
]);
@@ -57,22 +65,52 @@ Dict::Add('FR FR', 'French', 'Français', [
//
// Class: OAuthClientAzure
//
-Dict::Add('FR FR', 'French', 'Français', [
+
+Dict::Add('FR FR', 'French', 'Français', array(
'Class:OAuthClientAzure' => 'Client OAuth pour Microsoft Azure',
'Class:OAuthClientAzure/Name' => '%1$s (%2$s)',
-
-]);
+ 'Class:OAuthClientAzure/Attribute:scope' => 'Niveaux d\'accĂšs',
+ 'Class:OAuthClientAzure/Attribute:scope+' => 'Les niveaux par défaut sont les plus souvent suffisants',
+ 'Class:OAuthClientAzure/Attribute:scope/Value:SMTP' => 'SMTP',
+ 'Class:OAuthClientAzure/Attribute:scope/Value:SMTP+' => '',
+ 'Class:OAuthClientAzure/Attribute:scope/Value:IMAP' => 'IMAP',
+ 'Class:OAuthClientAzure/Attribute:scope/Value:IMAP+' => '',
+ 'Class:OAuthClientAzure/Attribute:advanced_scope' => 'Niveaux d\'accÚs avancé',
+ 'Class:OAuthClientAzure/Attribute:advanced_scope+' => 'A saisir, lorsque les niveaux prédéfinis ne suffisent pas',
+ 'Class:OAuthClientAzure/Attribute:used_scope' => 'Niveaux d\'accÚs utilisés',
+ 'Class:OAuthClientAzure/Attribute:used_scope+' => '',
+ 'Class:OAuthClientAzure/Attribute:used_scope/Value:simple' => 'Simple',
+ 'Class:OAuthClientAzure/Attribute:used_scope/Value:simple+' => '',
+ 'Class:OAuthClientAzure/Attribute:used_scope/Value:advanced' => 'Avancé',
+ 'Class:OAuthClientAzure/Attribute:used_scope/Value:advanced+' => '',
+ 'Class:OAuthClientAzure/Attribute:used_for_smtp' => 'Utilisé pour SMTP',
+ 'Class:OAuthClientAzure/Attribute:used_for_smtp+' => 'Le Client OAuth utilisĂ© pour l\'envoi d\'emails doit ĂȘtre Ă \'Oui\'',
+ 'Class:OAuthClientAzure/Attribute:used_for_smtp/Value:yes' => 'Oui',
+ 'Class:OAuthClientAzure/Attribute:used_for_smtp/Value:no' => 'Non',
+));
//
// Class: OAuthClientGoogle
//
-Dict::Add('FR FR', 'French', 'Français', [
+
+Dict::Add('FR FR', 'French', 'Français', array(
'Class:OAuthClientGoogle' => 'Client OAuth pour Google',
'Class:OAuthClientGoogle/Name' => '%1$s (%2$s)',
-]);
-
-
-// Additional language entries not present in English dict
-Dict::Add('FR FR', 'French', 'Français', array(
- 'Class:OAuthClient/Name' => '%1$s-%%2$~',
+ 'Class:OAuthClientGoogle/Attribute:scope' => 'Niveaux d\'accĂšs',
+ 'Class:OAuthClientGoogle/Attribute:scope+' => 'Les niveaux par défaut sont les plus souvent suffisants',
+ 'Class:OAuthClientGoogle/Attribute:scope/Value:SMTP' => 'SMTP',
+ 'Class:OAuthClientGoogle/Attribute:scope/Value:SMTP+' => '',
+ 'Class:OAuthClientGoogle/Attribute:scope/Value:IMAP' => 'IMAP',
+ 'Class:OAuthClientGoogle/Attribute:scope/Value:IMAP+' => '',
+ 'Class:OAuthClientGoogle/Attribute:advanced_scope' => 'Niveaux d\'accÚs avancé',
+ 'Class:OAuthClientGoogle/Attribute:advanced_scope+' => 'A saisir, lorsque les niveaux prédéfinis ne suffisent pas',
+ 'Class:OAuthClientGoogle/Attribute:used_scope' => 'Niveaux d\'accÚs utilisés',
+ 'Class:OAuthClientGoogle/Attribute:used_scope+' => '',
+ 'Class:OAuthClientGoogle/Attribute:used_scope/Value:simple' => 'Simple',
+ 'Class:OAuthClientGoogle/Attribute:used_scope/Value:advanced' => 'Avancé',
+ 'Class:OAuthClientGoogle/Attribute:used_scope/Value:advanced+' => '',
+ 'Class:OAuthClientGoogle/Attribute:used_for_smtp' => 'Utilisé pour SMTP',
+ 'Class:OAuthClientGoogle/Attribute:used_for_smtp+' => 'Le Client OAuth utilisĂ© pour l\'envoi d\'emails doit ĂȘtre Ă \'Oui\'',
+ 'Class:OAuthClientGoogle/Attribute:used_for_smtp/Value:yes' => 'Oui',
+ 'Class:OAuthClientGoogle/Attribute:used_for_smtp/Value:no' => 'Non',
));
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 38c3e9574..7a60deee9 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
@@ -25,9 +25,8 @@ SetupWebPage::AddModule(
'datamodel' => array(
'vendor/autoload.php',
'model.itop-oauth-client.php', // Contains the PHP code generated by the "compilation" of datamodel.remote-authent-oauth.xml
- 'src/Model/OAuthClientGoogle.php',
- 'src/Model/OAuthClientAzure.php',
'src/Service/PopupMenuExtension.php',
+ 'src/Service/ApplicationUIExtension.php',
),
'webservice' => array(
diff --git a/datamodels/2.x/itop-oauth-client/src/Model/OAuthClientAzure.php b/datamodels/2.x/itop-oauth-client/src/Model/OAuthClientAzure.php
deleted file mode 100644
index eb798e64d..000000000
--- a/datamodels/2.x/itop-oauth-client/src/Model/OAuthClientAzure.php
+++ /dev/null
@@ -1,128 +0,0 @@
- 'cloud',
- 'key_type' => 'autoincrement',
- 'name_attcode' => ['name', 'scope'],
- 'state_attcode' => '',
- 'reconc_keys' => ['provider', 'name'],
- 'db_table' => 'priv_oauth_client_azure',
- 'db_key_field' => 'id',
- 'icon' => utils::GetAbsoluteUrlModulesRoot().'itop-oauth-client/assets/img/icons8-azure.svg',
- 'db_finalclass_field' => '',
- 'uniqueness_rules' => [
- 'Username for scope' =>
- [
- 'attributes' => ['name', 'scope'],
- 'filter' => null,
- 'disabled' => false,
- 'is_blocking' => true,
- ],
- 'OAuth Server' =>
- [
- 'attributes' => ['provider', 'scope', 'client_id', 'client_secret'],
- 'filter' => null,
- 'disabled' => false,
- 'is_blocking' => true,
- ],
- ],
- ];
- MetaModel::Init_Params($aParams);
- MetaModel::Init_InheritAttributes();
- MetaModel::Init_AddAttribute(new AttributeEnum('scope', [
- 'allowed_values' => new ValueSetEnum('EMail'),
- 'display_style' => 'list',
- 'sql' => 'scope',
- 'default_value' => 'EMail',
- 'is_null_allowed' => false,
- 'depends_on' => [],
- 'always_load_in_tables' => true,
- ]));
-
- MetaModel::Init_SetZListItems('details', [
- 'name',
- 'status',
- 'description',
- 'provider',
- 'scope',
- 'redirect_url',
- 'client_id',
- 'client_secret',
- 'mailbox_list',
- ]);
- MetaModel::Init_SetZListItems('standard_search', [
- 'name',
- 'provider',
- 'status',
- ]);
- MetaModel::Init_SetZListItems('list', [
- 'status',
- 'provider',
- ]);
- }
-
- public function PrefillCreationForm(&$aContextParam)
- {
- $this->Set('provider', 'Azure');
- $this->Set('redirect_url', OAuthClientProviderFactory::GetRedirectUri());
-
- parent::PrefillCreationForm($aContextParam);
- }
-
- /**
- * Compute read-only values
- *
- * @return void
- * @throws \ArchivedObjectException
- * @throws \CoreException
- * @throws \CoreUnexpectedValue
- */
- public function ComputeValues()
- {
- parent::ComputeValues();
- if (empty($this->Get('provider'))) {
- $this->Set('provider', 'Azure');
- }
- if (empty($this->Get('redirect_url'))) {
- $this->Set('redirect_url', OAuthClientProviderFactory::GetRedirectUri());
- }
- }
-
- public function GetAttributeFlags($sAttCode, &$aReasons = array(), $sTargetState = '')
- {
- if ($sAttCode == 'provider' || $sAttCode == 'redirect_url') {
- return OPT_ATT_READONLY;
- }
-
- return parent::GetAttributeFlags($sAttCode, $aReasons, $sTargetState);
- }
-
- public function GetInitialStateAttributeFlags($sAttCode, &$aReasons = array())
- {
- if ($sAttCode == 'provider' || $sAttCode == 'redirect_url') {
- return OPT_ATT_READONLY;
- }
-
- return parent::GetInitialStateAttributeFlags($sAttCode, $aReasons);
- }
-
- public function GetDefaultMailServer()
- {
- return 'outlook.office365.com';
- }
-
- public function GetScope()
- {
- return 'https://outlook.office.com/IMAP.AccessAsUser.All https://outlook.office.com/SMTP.Send offline_access';
- }
-}
\ No newline at end of file
diff --git a/datamodels/2.x/itop-oauth-client/src/Model/OAuthClientGoogle.php b/datamodels/2.x/itop-oauth-client/src/Model/OAuthClientGoogle.php
deleted file mode 100644
index 83c111852..000000000
--- a/datamodels/2.x/itop-oauth-client/src/Model/OAuthClientGoogle.php
+++ /dev/null
@@ -1,134 +0,0 @@
- 'cloud',
- 'key_type' => 'autoincrement',
- 'name_attcode' => ['name', 'scope'],
- 'state_attcode' => '',
- 'reconc_keys' => ['provider', 'name'],
- 'db_table' => 'priv_oauth_client_google',
- 'db_key_field' => 'id',
- 'icon' => utils::GetAbsoluteUrlModulesRoot().'itop-oauth-client/assets/img/icons8-google.svg',
- 'db_finalclass_field' => '',
- 'uniqueness_rules' => [
- 'Username for scope' =>
- [
- 'attributes' => ['name', 'scope'],
- 'filter' => null,
- 'disabled' => false,
- 'is_blocking' => true,
- ],
- 'OAuth Server' =>
- [
- 'attributes' => ['provider', 'scope', 'client_id', 'client_secret'],
- 'filter' => null,
- 'disabled' => false,
- 'is_blocking' => true,
- ],
- ],
- );
- MetaModel::Init_Params($aParams);
- MetaModel::Init_InheritAttributes();
- MetaModel::Init_AddAttribute(new AttributeEnum('scope', [
- 'allowed_values' => new ValueSetEnum('EMail'),
- 'display_style' => 'list',
- 'sql' => 'scope',
- 'default_value' => 'EMail',
- 'is_null_allowed' => false,
- 'depends_on' => [],
- 'always_load_in_tables' => true,
- ]));
-
- MetaModel::Init_SetZListItems('details', [
- 'name',
- 'status',
- 'description',
- 'provider',
- 'scope',
- 'redirect_url',
- 'client_id',
- 'client_secret',
- 'mailbox_list',
- ]);
- MetaModel::Init_SetZListItems('standard_search', [
- 'name',
- 'provider',
- 'status',
- ]);
- MetaModel::Init_SetZListItems('list', [
- 'status',
- 'provider',
- ]);
- }
-
- public function PrefillCreationForm(&$aContextParam)
- {
- $this->Set('provider', 'Google');
- $this->Set('scope', 'EMail');
- $this->Set('redirect_url', OAuthClientProviderFactory::GetRedirectUri());
-
- parent::PrefillCreationForm($aContextParam);
- }
-
- public function GetAttributeFlags($sAttCode, &$aReasons = array(), $sTargetState = '')
- {
- if ($sAttCode == 'provider' || $sAttCode == 'scope' || $sAttCode == 'redirect_url') {
- return OPT_ATT_READONLY;
- }
-
- return parent::GetAttributeFlags($sAttCode, $aReasons, $sTargetState);
- }
-
- public function GetInitialStateAttributeFlags($sAttCode, &$aReasons = array())
- {
- if ($sAttCode == 'provider' || $sAttCode == 'scope' || $sAttCode == 'redirect_url') {
- return OPT_ATT_READONLY;
- }
-
- return parent::GetInitialStateAttributeFlags($sAttCode, $aReasons);
- }
-
- /**
- * Compute read-only values
- *
- * @return void
- * @throws \ArchivedObjectException
- * @throws \CoreException
- * @throws \CoreUnexpectedValue
- */
- public function ComputeValues()
- {
- parent::ComputeValues();
- if (empty($this->Get('provider'))) {
- $this->Set('provider', 'Google');
- }
- if (empty($this->Get('redirect_url'))) {
- $this->Set('redirect_url', OAuthClientProviderFactory::GetRedirectUri());
- }
- if (empty($this->Get('scope'))) {
- $this->Set('scope', 'EMail');
- }
- }
-
-
- public function GetDefaultMailServer()
- {
- return 'imap.gmail.com';
- }
-
- public function GetScope()
- {
- return 'https://mail.google.com/';
- }
-}
\ No newline at end of file
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..7fb0b8a53
--- /dev/null
+++ b/datamodels/2.x/itop-oauth-client/src/Service/ApplicationUIExtension.php
@@ -0,0 +1,31 @@
+Get('status') == 'inactive') {
+ return HILIGHT_CLASS_WARNING;
+ } elseif ($oObject->Get('used_for_smtp') == 'yes' && $oConfig->Get('email_transport_smtp.username') == $oObject->Get('name')) {
+ return HILIGHT_CLASS_OK;
+ }
+ }
+
+ return HILIGHT_CLASS_NONE;
+ }
+}
\ No newline at end of file
diff --git a/datamodels/2.x/itop-oauth-client/src/Service/PopupMenuExtension.php b/datamodels/2.x/itop-oauth-client/src/Service/PopupMenuExtension.php
index 6ca4783b4..31189de73 100644
--- a/datamodels/2.x/itop-oauth-client/src/Service/PopupMenuExtension.php
+++ b/datamodels/2.x/itop-oauth-client/src/Service/PopupMenuExtension.php
@@ -51,8 +51,8 @@ class PopupMenuExtension implements \iPopupMenuExtension
);
if ($bHasToken) {
- $sScope = $oObj->Get('scope');
- if ($sScope == 'EMail') {
+ $aScopes = $oObj->Get('scope')->GetValues();
+ if (in_array('IMAP', $aScopes)) {
$aParams = $oAppContext->GetAsHash();
$sMenu = 'Menu:CreateMailbox';
$sObjClass = get_class($oObj);
diff --git a/datamodels/2.x/itop-portal-base/portal/src/Form/ObjectFormManager.php b/datamodels/2.x/itop-portal-base/portal/src/Form/ObjectFormManager.php
index 48e5cd1be..d1bd69106 100644
--- a/datamodels/2.x/itop-portal-base/portal/src/Form/ObjectFormManager.php
+++ b/datamodels/2.x/itop-portal-base/portal/src/Form/ObjectFormManager.php
@@ -93,7 +93,7 @@ class ObjectFormManager extends FormManager
* @since 2.7.6 3.0.0 N°4384 method creation : factorize as this is used twice now
* @since 2.7.7 3.0.1 N°4867 now only used once, but we decided to keep this method anyway
*/
- protected static function DecodeFormManagerData($formManagerData)
+ public static function DecodeFormManagerData($formManagerData)
{
if (is_array($formManagerData)) {
return $formManagerData;
diff --git a/datamodels/2.x/itop-portal-base/portal/src/Helper/ObjectFormHandlerHelper.php b/datamodels/2.x/itop-portal-base/portal/src/Helper/ObjectFormHandlerHelper.php
index 2c36eed94..366e7b607 100644
--- a/datamodels/2.x/itop-portal-base/portal/src/Helper/ObjectFormHandlerHelper.php
+++ b/datamodels/2.x/itop-portal-base/portal/src/Helper/ObjectFormHandlerHelper.php
@@ -452,7 +452,7 @@ class ObjectFormHandlerHelper
* @throws \OQLException
*/
public function CheckReadFormDataAllowed($sFormManagerData){
- $aJsonFromData = json_decode($sFormManagerData, true);
+ $aJsonFromData = ObjectFormManager::DecodeFormManagerData($sFormManagerData);
if(isset($aJsonFromData['formobject_class'])
&& isset($aJsonFromData['formobject_id'])
&& !$this->oSecurityHelper->IsActionAllowed(UR_ACTION_READ, $aJsonFromData['formobject_class'], $aJsonFromData['formobject_id'])){
diff --git a/datamodels/2.x/itop-tickets/datamodel.itop-tickets.xml b/datamodels/2.x/itop-tickets/datamodel.itop-tickets.xml
index faa3173b6..8370f9fd5 100755
--- a/datamodels/2.x/itop-tickets/datamodel.itop-tickets.xml
+++ b/datamodels/2.x/itop-tickets/datamodel.itop-tickets.xml
@@ -1388,4 +1388,10 @@
+
+
+ 500
+ true
+
+
diff --git a/lib/autoload.php b/lib/autoload.php
index 743c6b6d6..f37a5b80e 100644
--- a/lib/autoload.php
+++ b/lib/autoload.php
@@ -2,11 +2,6 @@
// autoload.php @generated by Composer
-if (PHP_VERSION_ID < 50600) {
- echo 'Composer 2.3.0 dropped support for autoloading on PHP <5.6 and you are running '.PHP_VERSION.', please upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2". Aborting.'.PHP_EOL;
- exit(1);
-}
-
require_once __DIR__ . '/composer/autoload_real.php';
return ComposerAutoloaderInit5e7efdfe4e8f9526eb41991410b96239::getLoader();
diff --git a/lib/composer/ClassLoader.php b/lib/composer/ClassLoader.php
index afef3fa2a..0cd6055d1 100644
--- a/lib/composer/ClassLoader.php
+++ b/lib/composer/ClassLoader.php
@@ -149,7 +149,7 @@ class ClassLoader
/**
* @return string[] Array of classname => path
- * @psalm-return array
+ * @psalm-var array
*/
public function getClassMap()
{
diff --git a/lib/composer/autoload_classmap.php b/lib/composer/autoload_classmap.php
index c0b2ac8ea..3b84be56e 100644
--- a/lib/composer/autoload_classmap.php
+++ b/lib/composer/autoload_classmap.php
@@ -2,7 +2,7 @@
// autoload_classmap.php @generated by Composer
-$vendorDir = dirname(__DIR__);
+$vendorDir = dirname(dirname(__FILE__));
$baseDir = dirname($vendorDir);
return array(
diff --git a/lib/composer/autoload_files.php b/lib/composer/autoload_files.php
index ae02e5199..7be757bea 100644
--- a/lib/composer/autoload_files.php
+++ b/lib/composer/autoload_files.php
@@ -2,25 +2,25 @@
// autoload_files.php @generated by Composer
-$vendorDir = dirname(__DIR__);
+$vendorDir = dirname(dirname(__FILE__));
$baseDir = dirname($vendorDir);
return array(
'320cde22f66dd4f5d3fd621d3e88b98f' => $vendorDir . '/symfony/polyfill-ctype/bootstrap.php',
+ '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php',
'5255c38a0faeba867671b61dfda6d864' => $vendorDir . '/paragonie/random_compat/lib/random.php',
'023d27dca8066ef29e6739335ea73bad' => $vendorDir . '/symfony/polyfill-php70/bootstrap.php',
- '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php',
+ '32dcc8afd4335739640db7d200c1971d' => $vendorDir . '/symfony/polyfill-apcu/bootstrap.php',
+ '667aeda72477189d0494fecd327c3641' => $vendorDir . '/symfony/var-dumper/Resources/functions/dump.php',
+ 'bd9634f2d41831496de0d3dfe4c94881' => $vendorDir . '/symfony/polyfill-php56/bootstrap.php',
'7e9bd612cc444b3eed788ebbe46263a0' => $vendorDir . '/laminas/laminas-zendframework-bridge/src/autoload.php',
'e69f7f6ee287b969198c3c9d6777bd38' => $vendorDir . '/symfony/polyfill-intl-normalizer/bootstrap.php',
'25072dd6e2470089de65ae7bf11d3109' => $vendorDir . '/symfony/polyfill-php72/bootstrap.php',
'f598d06aa772fa33d905e87be6398fb1' => $vendorDir . '/symfony/polyfill-intl-idn/bootstrap.php',
'7b11c4dc42b3b3023073cb14e519683c' => $vendorDir . '/ralouphie/getallheaders/src/getallheaders.php',
- 'bd9634f2d41831496de0d3dfe4c94881' => $vendorDir . '/symfony/polyfill-php56/bootstrap.php',
'c964ee0ededf28c96ebd9db5099ef910' => $vendorDir . '/guzzlehttp/promises/src/functions_include.php',
'a0edc8309cc5e1d60e3047b5df6b7052' => $vendorDir . '/guzzlehttp/psr7/src/functions_include.php',
'37a3dc5111fe8f707ab4c132ef1dbc62' => $vendorDir . '/guzzlehttp/guzzle/src/functions_include.php',
- '32dcc8afd4335739640db7d200c1971d' => $vendorDir . '/symfony/polyfill-apcu/bootstrap.php',
'def43f6c87e4f8dfd0c9e1b1bab14fe8' => $vendorDir . '/symfony/polyfill-iconv/bootstrap.php',
- '667aeda72477189d0494fecd327c3641' => $vendorDir . '/symfony/var-dumper/Resources/functions/dump.php',
'2c102faa651ef8ea5874edb585946bce' => $vendorDir . '/swiftmailer/swiftmailer/lib/swift_required.php',
);
diff --git a/lib/composer/autoload_namespaces.php b/lib/composer/autoload_namespaces.php
index e6117c750..d12922d08 100644
--- a/lib/composer/autoload_namespaces.php
+++ b/lib/composer/autoload_namespaces.php
@@ -2,7 +2,7 @@
// autoload_namespaces.php @generated by Composer
-$vendorDir = dirname(__DIR__);
+$vendorDir = dirname(dirname(__FILE__));
$baseDir = dirname($vendorDir);
return array(
diff --git a/lib/composer/autoload_psr4.php b/lib/composer/autoload_psr4.php
index 651c9f0c1..ca8b4b9f6 100644
--- a/lib/composer/autoload_psr4.php
+++ b/lib/composer/autoload_psr4.php
@@ -2,7 +2,7 @@
// autoload_psr4.php @generated by Composer
-$vendorDir = dirname(__DIR__);
+$vendorDir = dirname(dirname(__FILE__));
$baseDir = dirname($vendorDir);
return array(
diff --git a/lib/composer/autoload_real.php b/lib/composer/autoload_real.php
index 18fec29f2..661cd2543 100644
--- a/lib/composer/autoload_real.php
+++ b/lib/composer/autoload_real.php
@@ -2,7 +2,7 @@
// autoload_real.php @generated by Composer
-class ComposerAutoloaderInit5e7efdfe4e8f9526eb41991410b96239
+class ComposerAutoloaderInit0018331147de7601e7552f7da8e3bb8b
{
private static $loader;
@@ -24,39 +24,47 @@ class ComposerAutoloaderInit5e7efdfe4e8f9526eb41991410b96239
require __DIR__ . '/platform_check.php';
- spl_autoload_register(array('ComposerAutoloaderInit5e7efdfe4e8f9526eb41991410b96239', 'loadClassLoader'), true, true);
- self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
- spl_autoload_unregister(array('ComposerAutoloaderInit5e7efdfe4e8f9526eb41991410b96239', 'loadClassLoader'));
+ spl_autoload_register(array('ComposerAutoloaderInit0018331147de7601e7552f7da8e3bb8b', 'loadClassLoader'), true, true);
+ self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
+ spl_autoload_unregister(array('ComposerAutoloaderInit0018331147de7601e7552f7da8e3bb8b', 'loadClassLoader'));
$includePaths = require __DIR__ . '/include_paths.php';
$includePaths[] = get_include_path();
set_include_path(implode(PATH_SEPARATOR, $includePaths));
- require __DIR__ . '/autoload_static.php';
- call_user_func(\Composer\Autoload\ComposerStaticInit5e7efdfe4e8f9526eb41991410b96239::getInitializer($loader));
+ $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
+ if ($useStaticLoader) {
+ require __DIR__ . '/autoload_static.php';
+
+ call_user_func(\Composer\Autoload\ComposerStaticInit0018331147de7601e7552f7da8e3bb8b::getInitializer($loader));
+ } else {
+ $classMap = require __DIR__ . '/autoload_classmap.php';
+ if ($classMap) {
+ $loader->addClassMap($classMap);
+ }
+ }
$loader->setClassMapAuthoritative(true);
$loader->register(true);
- $includeFiles = \Composer\Autoload\ComposerStaticInit5e7efdfe4e8f9526eb41991410b96239::$files;
+ if ($useStaticLoader) {
+ $includeFiles = Composer\Autoload\ComposerStaticInit0018331147de7601e7552f7da8e3bb8b::$files;
+ } else {
+ $includeFiles = require __DIR__ . '/autoload_files.php';
+ }
foreach ($includeFiles as $fileIdentifier => $file) {
- composerRequire5e7efdfe4e8f9526eb41991410b96239($fileIdentifier, $file);
+ composerRequire0018331147de7601e7552f7da8e3bb8b($fileIdentifier, $file);
}
return $loader;
}
}
-/**
- * @param string $fileIdentifier
- * @param string $file
- * @return void
- */
-function composerRequire5e7efdfe4e8f9526eb41991410b96239($fileIdentifier, $file)
+function composerRequire0018331147de7601e7552f7da8e3bb8b($fileIdentifier, $file)
{
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
- $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
-
require $file;
+
+ $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
}
}
diff --git a/lib/composer/autoload_static.php b/lib/composer/autoload_static.php
index 3321cc113..9a6052572 100644
--- a/lib/composer/autoload_static.php
+++ b/lib/composer/autoload_static.php
@@ -8,21 +8,21 @@ class ComposerStaticInit5e7efdfe4e8f9526eb41991410b96239
{
public static $files = array (
'320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php',
+ '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php',
'5255c38a0faeba867671b61dfda6d864' => __DIR__ . '/..' . '/paragonie/random_compat/lib/random.php',
'023d27dca8066ef29e6739335ea73bad' => __DIR__ . '/..' . '/symfony/polyfill-php70/bootstrap.php',
- '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php',
+ '32dcc8afd4335739640db7d200c1971d' => __DIR__ . '/..' . '/symfony/polyfill-apcu/bootstrap.php',
+ '667aeda72477189d0494fecd327c3641' => __DIR__ . '/..' . '/symfony/var-dumper/Resources/functions/dump.php',
+ 'bd9634f2d41831496de0d3dfe4c94881' => __DIR__ . '/..' . '/symfony/polyfill-php56/bootstrap.php',
'7e9bd612cc444b3eed788ebbe46263a0' => __DIR__ . '/..' . '/laminas/laminas-zendframework-bridge/src/autoload.php',
'e69f7f6ee287b969198c3c9d6777bd38' => __DIR__ . '/..' . '/symfony/polyfill-intl-normalizer/bootstrap.php',
'25072dd6e2470089de65ae7bf11d3109' => __DIR__ . '/..' . '/symfony/polyfill-php72/bootstrap.php',
'f598d06aa772fa33d905e87be6398fb1' => __DIR__ . '/..' . '/symfony/polyfill-intl-idn/bootstrap.php',
'7b11c4dc42b3b3023073cb14e519683c' => __DIR__ . '/..' . '/ralouphie/getallheaders/src/getallheaders.php',
- 'bd9634f2d41831496de0d3dfe4c94881' => __DIR__ . '/..' . '/symfony/polyfill-php56/bootstrap.php',
'c964ee0ededf28c96ebd9db5099ef910' => __DIR__ . '/..' . '/guzzlehttp/promises/src/functions_include.php',
'a0edc8309cc5e1d60e3047b5df6b7052' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/functions_include.php',
'37a3dc5111fe8f707ab4c132ef1dbc62' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/functions_include.php',
- '32dcc8afd4335739640db7d200c1971d' => __DIR__ . '/..' . '/symfony/polyfill-apcu/bootstrap.php',
'def43f6c87e4f8dfd0c9e1b1bab14fe8' => __DIR__ . '/..' . '/symfony/polyfill-iconv/bootstrap.php',
- '667aeda72477189d0494fecd327c3641' => __DIR__ . '/..' . '/symfony/var-dumper/Resources/functions/dump.php',
'2c102faa651ef8ea5874edb585946bce' => __DIR__ . '/..' . '/swiftmailer/swiftmailer/lib/swift_required.php',
);
diff --git a/lib/composer/include_paths.php b/lib/composer/include_paths.php
index af33c1491..d4fb96718 100644
--- a/lib/composer/include_paths.php
+++ b/lib/composer/include_paths.php
@@ -2,7 +2,7 @@
// include_paths.php @generated by Composer
-$vendorDir = dirname(__DIR__);
+$vendorDir = dirname(dirname(__FILE__));
$baseDir = dirname($vendorDir);
return array(
diff --git a/lib/composer/installed.php b/lib/composer/installed.php
index e8ff118fa..5ba7d993f 100644
--- a/lib/composer/installed.php
+++ b/lib/composer/installed.php
@@ -1,40 +1,40 @@
array(
+ 'name' => 'combodo/itop',
'pretty_version' => 'dev-develop',
'version' => 'dev-develop',
+ 'reference' => 'd388c3fd3d2a11983b61d268b2323a4ff0d0dbcb',
'type' => 'project',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
- 'reference' => 'a0f28a9098796248f63a8e9141723724d019d082',
- 'name' => '__root__',
'dev' => true,
),
'versions' => array(
- '__root__' => array(
+ 'combodo/itop' => array(
'pretty_version' => 'dev-develop',
'version' => 'dev-develop',
+ 'reference' => 'd388c3fd3d2a11983b61d268b2323a4ff0d0dbcb',
'type' => 'project',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
- 'reference' => 'a0f28a9098796248f63a8e9141723724d019d082',
'dev_requirement' => false,
),
'combodo/tcpdf' => array(
'pretty_version' => '6.4.4',
'version' => '6.4.4.0',
+ 'reference' => '0e31c013ccd000aa6762e9186778aa6e259ac8e8',
'type' => 'library',
'install_path' => __DIR__ . '/../combodo/tcpdf',
'aliases' => array(),
- 'reference' => '0e31c013ccd000aa6762e9186778aa6e259ac8e8',
'dev_requirement' => false,
),
'container-interop/container-interop' => array(
'pretty_version' => '1.2.0',
'version' => '1.2.0.0',
+ 'reference' => '79cbf1341c22ec75643d841642dd5d6acd83bdb8',
'type' => 'library',
'install_path' => __DIR__ . '/../container-interop/container-interop',
'aliases' => array(),
- 'reference' => '79cbf1341c22ec75643d841642dd5d6acd83bdb8',
'dev_requirement' => false,
),
'container-interop/container-interop-implementation' => array(
@@ -46,208 +46,208 @@
'doctrine/lexer' => array(
'pretty_version' => '1.0.2',
'version' => '1.0.2.0',
+ 'reference' => '1febd6c3ef84253d7c815bed85fc622ad207a9f8',
'type' => 'library',
'install_path' => __DIR__ . '/../doctrine/lexer',
'aliases' => array(),
- 'reference' => '1febd6c3ef84253d7c815bed85fc622ad207a9f8',
'dev_requirement' => false,
),
'egulias/email-validator' => array(
'pretty_version' => '2.1.25',
'version' => '2.1.25.0',
+ 'reference' => '0dbf5d78455d4d6a41d186da50adc1122ec066f4',
'type' => 'library',
'install_path' => __DIR__ . '/../egulias/email-validator',
'aliases' => array(),
- 'reference' => '0dbf5d78455d4d6a41d186da50adc1122ec066f4',
'dev_requirement' => false,
),
'firebase/php-jwt' => array(
'pretty_version' => 'v5.5.1',
'version' => '5.5.1.0',
+ 'reference' => '83b609028194aa042ea33b5af2d41a7427de80e6',
'type' => 'library',
'install_path' => __DIR__ . '/../firebase/php-jwt',
'aliases' => array(),
- 'reference' => '83b609028194aa042ea33b5af2d41a7427de80e6',
'dev_requirement' => false,
),
'guzzlehttp/guzzle' => array(
'pretty_version' => '6.5.8',
'version' => '6.5.8.0',
+ 'reference' => 'a52f0440530b54fa079ce76e8c5d196a42cad981',
'type' => 'library',
'install_path' => __DIR__ . '/../guzzlehttp/guzzle',
'aliases' => array(),
- 'reference' => 'a52f0440530b54fa079ce76e8c5d196a42cad981',
'dev_requirement' => false,
),
'guzzlehttp/promises' => array(
'pretty_version' => '1.5.1',
'version' => '1.5.1.0',
+ 'reference' => 'fe752aedc9fd8fcca3fe7ad05d419d32998a06da',
'type' => 'library',
'install_path' => __DIR__ . '/../guzzlehttp/promises',
'aliases' => array(),
- 'reference' => 'fe752aedc9fd8fcca3fe7ad05d419d32998a06da',
'dev_requirement' => false,
),
'guzzlehttp/psr7' => array(
'pretty_version' => '1.9.0',
'version' => '1.9.0.0',
+ 'reference' => 'e98e3e6d4f86621a9b75f623996e6bbdeb4b9318',
'type' => 'library',
'install_path' => __DIR__ . '/../guzzlehttp/psr7',
'aliases' => array(),
- 'reference' => 'e98e3e6d4f86621a9b75f623996e6bbdeb4b9318',
'dev_requirement' => false,
),
'laminas/laminas-loader' => array(
'pretty_version' => '2.6.1',
'version' => '2.6.1.0',
+ 'reference' => '5d01c2c237ae9e68bec262f339947e2ea18979bc',
'type' => 'library',
'install_path' => __DIR__ . '/../laminas/laminas-loader',
'aliases' => array(),
- 'reference' => '5d01c2c237ae9e68bec262f339947e2ea18979bc',
'dev_requirement' => false,
),
'laminas/laminas-mail' => array(
'pretty_version' => '2.11.1',
'version' => '2.11.1.0',
+ 'reference' => '7f674afeb38100b1869ce8e56bf2ec3cba3c679c',
'type' => 'library',
'install_path' => __DIR__ . '/../laminas/laminas-mail',
'aliases' => array(),
- 'reference' => '7f674afeb38100b1869ce8e56bf2ec3cba3c679c',
'dev_requirement' => false,
),
'laminas/laminas-mime' => array(
'pretty_version' => '2.7.4',
'version' => '2.7.4.0',
+ 'reference' => 'e45a7d856bf7b4a7b5bd00d6371f9961dc233add',
'type' => 'library',
'install_path' => __DIR__ . '/../laminas/laminas-mime',
'aliases' => array(),
- 'reference' => 'e45a7d856bf7b4a7b5bd00d6371f9961dc233add',
'dev_requirement' => false,
),
'laminas/laminas-servicemanager' => array(
'pretty_version' => '3.5.2',
'version' => '3.5.2.0',
+ 'reference' => '0669e1eec8d9f61e35a5bc5012796d49f418b259',
'type' => 'library',
'install_path' => __DIR__ . '/../laminas/laminas-servicemanager',
'aliases' => array(),
- 'reference' => '0669e1eec8d9f61e35a5bc5012796d49f418b259',
'dev_requirement' => false,
),
'laminas/laminas-stdlib' => array(
'pretty_version' => '3.2.1',
'version' => '3.2.1.0',
+ 'reference' => '2b18347625a2f06a1a485acfbc870f699dbe51c6',
'type' => 'library',
'install_path' => __DIR__ . '/../laminas/laminas-stdlib',
'aliases' => array(),
- 'reference' => '2b18347625a2f06a1a485acfbc870f699dbe51c6',
'dev_requirement' => false,
),
'laminas/laminas-validator' => array(
'pretty_version' => '2.12.2',
'version' => '2.12.2.0',
+ 'reference' => '0813f234812d9fa9058b6da39eb13dedc90227db',
'type' => 'library',
'install_path' => __DIR__ . '/../laminas/laminas-validator',
'aliases' => array(),
- 'reference' => '0813f234812d9fa9058b6da39eb13dedc90227db',
'dev_requirement' => false,
),
'laminas/laminas-zendframework-bridge' => array(
'pretty_version' => '1.1.1',
'version' => '1.1.1.0',
+ 'reference' => '6ede70583e101030bcace4dcddd648f760ddf642',
'type' => 'library',
'install_path' => __DIR__ . '/../laminas/laminas-zendframework-bridge',
'aliases' => array(),
- 'reference' => '6ede70583e101030bcace4dcddd648f760ddf642',
'dev_requirement' => false,
),
'league/oauth2-client' => array(
'pretty_version' => '2.6.1',
'version' => '2.6.1.0',
+ 'reference' => '2334c249907190c132364f5dae0287ab8666aa19',
'type' => 'library',
'install_path' => __DIR__ . '/../league/oauth2-client',
'aliases' => array(),
- 'reference' => '2334c249907190c132364f5dae0287ab8666aa19',
'dev_requirement' => false,
),
'league/oauth2-google' => array(
'pretty_version' => '3.0.4',
'version' => '3.0.4.0',
+ 'reference' => '6b79441f244040760bed5fdcd092a2bda7cf34c6',
'type' => 'library',
'install_path' => __DIR__ . '/../league/oauth2-google',
'aliases' => array(),
- 'reference' => '6b79441f244040760bed5fdcd092a2bda7cf34c6',
'dev_requirement' => false,
),
'nikic/php-parser' => array(
'pretty_version' => 'v4.13.2',
'version' => '4.13.2.0',
+ 'reference' => '210577fe3cf7badcc5814d99455df46564f3c077',
'type' => 'library',
'install_path' => __DIR__ . '/../nikic/php-parser',
'aliases' => array(),
- 'reference' => '210577fe3cf7badcc5814d99455df46564f3c077',
'dev_requirement' => false,
),
'paragonie/random_compat' => array(
'pretty_version' => 'v2.0.18',
'version' => '2.0.18.0',
+ 'reference' => '0a58ef6e3146256cc3dc7cc393927bcc7d1b72db',
'type' => 'library',
'install_path' => __DIR__ . '/../paragonie/random_compat',
'aliases' => array(),
- 'reference' => '0a58ef6e3146256cc3dc7cc393927bcc7d1b72db',
'dev_requirement' => false,
),
'pear/archive_tar' => array(
'pretty_version' => '1.4.14',
'version' => '1.4.14.0',
+ 'reference' => '4d761c5334c790e45ef3245f0864b8955c562caa',
'type' => 'library',
'install_path' => __DIR__ . '/../pear/archive_tar',
'aliases' => array(),
- 'reference' => '4d761c5334c790e45ef3245f0864b8955c562caa',
'dev_requirement' => false,
),
'pear/console_getopt' => array(
'pretty_version' => 'v1.4.3',
'version' => '1.4.3.0',
+ 'reference' => 'a41f8d3e668987609178c7c4a9fe48fecac53fa0',
'type' => 'library',
'install_path' => __DIR__ . '/../pear/console_getopt',
'aliases' => array(),
- 'reference' => 'a41f8d3e668987609178c7c4a9fe48fecac53fa0',
'dev_requirement' => false,
),
'pear/pear-core-minimal' => array(
'pretty_version' => 'v1.10.10',
'version' => '1.10.10.0',
+ 'reference' => '625a3c429d9b2c1546438679074cac1b089116a7',
'type' => 'library',
'install_path' => __DIR__ . '/../pear/pear-core-minimal',
'aliases' => array(),
- 'reference' => '625a3c429d9b2c1546438679074cac1b089116a7',
'dev_requirement' => false,
),
'pear/pear_exception' => array(
'pretty_version' => 'v1.0.1',
'version' => '1.0.1.0',
+ 'reference' => 'dbb42a5a0e45f3adcf99babfb2a1ba77b8ac36a7',
'type' => 'class',
'install_path' => __DIR__ . '/../pear/pear_exception',
'aliases' => array(),
- 'reference' => 'dbb42a5a0e45f3adcf99babfb2a1ba77b8ac36a7',
'dev_requirement' => false,
),
'pelago/emogrifier' => array(
'pretty_version' => 'v3.1.0',
'version' => '3.1.0.0',
+ 'reference' => 'f6a5c7d44612d86c3901c93f1592f5440e6b2cd8',
'type' => 'library',
'install_path' => __DIR__ . '/../pelago/emogrifier',
'aliases' => array(),
- 'reference' => 'f6a5c7d44612d86c3901c93f1592f5440e6b2cd8',
'dev_requirement' => false,
),
'psr/cache' => array(
'pretty_version' => '1.0.1',
'version' => '1.0.1.0',
+ 'reference' => 'd11b50ad223250cf17b86e38383413f5a6764bf8',
'type' => 'library',
'install_path' => __DIR__ . '/../psr/cache',
'aliases' => array(),
- 'reference' => 'd11b50ad223250cf17b86e38383413f5a6764bf8',
'dev_requirement' => false,
),
'psr/cache-implementation' => array(
@@ -259,10 +259,10 @@
'psr/container' => array(
'pretty_version' => '1.0.0',
'version' => '1.0.0.0',
+ 'reference' => 'b7ce3b176482dbbc1245ebf52b181af44c2cf55f',
'type' => 'library',
'install_path' => __DIR__ . '/../psr/container',
'aliases' => array(),
- 'reference' => 'b7ce3b176482dbbc1245ebf52b181af44c2cf55f',
'dev_requirement' => false,
),
'psr/container-implementation' => array(
@@ -275,10 +275,10 @@
'psr/http-message' => array(
'pretty_version' => '1.0.1',
'version' => '1.0.1.0',
+ 'reference' => 'f6561bf28d520154e4b0ec72be95418abe6d9363',
'type' => 'library',
'install_path' => __DIR__ . '/../psr/http-message',
'aliases' => array(),
- 'reference' => 'f6561bf28d520154e4b0ec72be95418abe6d9363',
'dev_requirement' => false,
),
'psr/http-message-implementation' => array(
@@ -290,10 +290,10 @@
'psr/log' => array(
'pretty_version' => '1.1.2',
'version' => '1.1.2.0',
+ 'reference' => '446d54b4cb6bf489fc9d75f55843658e6f25d801',
'type' => 'library',
'install_path' => __DIR__ . '/../psr/log',
'aliases' => array(),
- 'reference' => '446d54b4cb6bf489fc9d75f55843658e6f25d801',
'dev_requirement' => false,
),
'psr/log-implementation' => array(
@@ -305,10 +305,10 @@
'psr/simple-cache' => array(
'pretty_version' => '1.0.1',
'version' => '1.0.1.0',
+ 'reference' => '408d5eafb83c57f6365a3ca330ff23aa4a5fa39b',
'type' => 'library',
'install_path' => __DIR__ . '/../psr/simple-cache',
'aliases' => array(),
- 'reference' => '408d5eafb83c57f6365a3ca330ff23aa4a5fa39b',
'dev_requirement' => false,
),
'psr/simple-cache-implementation' => array(
@@ -320,10 +320,10 @@
'ralouphie/getallheaders' => array(
'pretty_version' => '3.0.3',
'version' => '3.0.3.0',
+ 'reference' => '120b605dfeb996808c31b6477290a714d356e822',
'type' => 'library',
'install_path' => __DIR__ . '/../ralouphie/getallheaders',
'aliases' => array(),
- 'reference' => '120b605dfeb996808c31b6477290a714d356e822',
'dev_requirement' => false,
),
'rsky/pear-core-min' => array(
@@ -335,298 +335,298 @@
'scssphp/scssphp' => array(
'pretty_version' => '1.0.6',
'version' => '1.0.6.0',
+ 'reference' => '5b3c9d704950d8f9637f5110c36c281ec47dc13c',
'type' => 'library',
'install_path' => __DIR__ . '/../scssphp/scssphp',
'aliases' => array(),
- 'reference' => '5b3c9d704950d8f9637f5110c36c281ec47dc13c',
'dev_requirement' => false,
),
'swiftmailer/swiftmailer' => array(
'pretty_version' => 'v6.3.0',
'version' => '6.3.0.0',
+ 'reference' => '8a5d5072dca8f48460fce2f4131fcc495eec654c',
'type' => 'library',
'install_path' => __DIR__ . '/../swiftmailer/swiftmailer',
'aliases' => array(),
- 'reference' => '8a5d5072dca8f48460fce2f4131fcc495eec654c',
'dev_requirement' => false,
),
'symfony/cache' => array(
'pretty_version' => 'v3.4.47',
'version' => '3.4.47.0',
+ 'reference' => 'a7a14c4832760bd1fbd31be2859ffedc9b6ff813',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/cache',
'aliases' => array(),
- 'reference' => 'a7a14c4832760bd1fbd31be2859ffedc9b6ff813',
'dev_requirement' => false,
),
'symfony/class-loader' => array(
'pretty_version' => 'v3.4.47',
'version' => '3.4.47.0',
+ 'reference' => 'a22265a9f3511c0212bf79f54910ca5a77c0e92c',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/class-loader',
'aliases' => array(),
- 'reference' => 'a22265a9f3511c0212bf79f54910ca5a77c0e92c',
'dev_requirement' => false,
),
'symfony/config' => array(
'pretty_version' => 'v3.4.47',
'version' => '3.4.47.0',
+ 'reference' => 'bc6b3fd3930d4b53a60b42fe2ed6fc466b75f03f',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/config',
'aliases' => array(),
- 'reference' => 'bc6b3fd3930d4b53a60b42fe2ed6fc466b75f03f',
'dev_requirement' => false,
),
'symfony/console' => array(
'pretty_version' => 'v3.4.47',
'version' => '3.4.47.0',
+ 'reference' => 'a10b1da6fc93080c180bba7219b5ff5b7518fe81',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/console',
'aliases' => array(),
- 'reference' => 'a10b1da6fc93080c180bba7219b5ff5b7518fe81',
'dev_requirement' => false,
),
'symfony/css-selector' => array(
'pretty_version' => 'v3.4.47',
'version' => '3.4.47.0',
+ 'reference' => 'da3d9da2ce0026771f5fe64cb332158f1bd2bc33',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/css-selector',
'aliases' => array(),
- 'reference' => 'da3d9da2ce0026771f5fe64cb332158f1bd2bc33',
'dev_requirement' => false,
),
'symfony/debug' => array(
'pretty_version' => 'v3.4.47',
'version' => '3.4.47.0',
+ 'reference' => 'ab42889de57fdfcfcc0759ab102e2fd4ea72dcae',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/debug',
'aliases' => array(),
- 'reference' => 'ab42889de57fdfcfcc0759ab102e2fd4ea72dcae',
'dev_requirement' => false,
),
'symfony/dependency-injection' => array(
'pretty_version' => 'v3.4.47',
'version' => '3.4.47.0',
+ 'reference' => '51d2a2708c6ceadad84393f8581df1dcf9e5e84b',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/dependency-injection',
'aliases' => array(),
- 'reference' => '51d2a2708c6ceadad84393f8581df1dcf9e5e84b',
'dev_requirement' => false,
),
'symfony/dotenv' => array(
'pretty_version' => 'v3.4.47',
'version' => '3.4.47.0',
+ 'reference' => '1022723ac4f56b001d99691d96c6025dbf1404f1',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/dotenv',
'aliases' => array(),
- 'reference' => '1022723ac4f56b001d99691d96c6025dbf1404f1',
'dev_requirement' => false,
),
'symfony/event-dispatcher' => array(
'pretty_version' => 'v3.4.47',
'version' => '3.4.47.0',
+ 'reference' => '31fde73757b6bad247c54597beef974919ec6860',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/event-dispatcher',
'aliases' => array(),
- 'reference' => '31fde73757b6bad247c54597beef974919ec6860',
'dev_requirement' => false,
),
'symfony/filesystem' => array(
'pretty_version' => 'v3.4.47',
'version' => '3.4.47.0',
+ 'reference' => 'e58d7841cddfed6e846829040dca2cca0ebbbbb3',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/filesystem',
'aliases' => array(),
- 'reference' => 'e58d7841cddfed6e846829040dca2cca0ebbbbb3',
'dev_requirement' => false,
),
'symfony/finder' => array(
'pretty_version' => 'v3.4.47',
'version' => '3.4.47.0',
+ 'reference' => 'b6b6ad3db3edb1b4b1c1896b1975fb684994de6e',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/finder',
'aliases' => array(),
- 'reference' => 'b6b6ad3db3edb1b4b1c1896b1975fb684994de6e',
'dev_requirement' => false,
),
'symfony/framework-bundle' => array(
'pretty_version' => 'v3.4.47',
'version' => '3.4.47.0',
+ 'reference' => '6c95e747b75ddd2af61152ce93bf87299d15710e',
'type' => 'symfony-bundle',
'install_path' => __DIR__ . '/../symfony/framework-bundle',
'aliases' => array(),
- 'reference' => '6c95e747b75ddd2af61152ce93bf87299d15710e',
'dev_requirement' => false,
),
'symfony/http-foundation' => array(
'pretty_version' => 'v3.4.47',
'version' => '3.4.47.0',
+ 'reference' => 'b9885fcce6fe494201da4f70a9309770e9d13dc8',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/http-foundation',
'aliases' => array(),
- 'reference' => 'b9885fcce6fe494201da4f70a9309770e9d13dc8',
'dev_requirement' => false,
),
'symfony/http-kernel' => array(
'pretty_version' => 'v3.4.49',
'version' => '3.4.49.0',
+ 'reference' => '5aa72405f5bd5583c36ed6e756acb17d3f98ac40',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/http-kernel',
'aliases' => array(),
- 'reference' => '5aa72405f5bd5583c36ed6e756acb17d3f98ac40',
'dev_requirement' => false,
),
'symfony/polyfill-apcu' => array(
'pretty_version' => 'v1.19.0',
'version' => '1.19.0.0',
+ 'reference' => 'b44b51e7814c23bfbd793a16ead5d7ce43ed23c5',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/polyfill-apcu',
'aliases' => array(),
- 'reference' => 'b44b51e7814c23bfbd793a16ead5d7ce43ed23c5',
'dev_requirement' => false,
),
'symfony/polyfill-ctype' => array(
'pretty_version' => 'v1.19.0',
'version' => '1.19.0.0',
+ 'reference' => 'aed596913b70fae57be53d86faa2e9ef85a2297b',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/polyfill-ctype',
'aliases' => array(),
- 'reference' => 'aed596913b70fae57be53d86faa2e9ef85a2297b',
'dev_requirement' => false,
),
'symfony/polyfill-iconv' => array(
'pretty_version' => 'v1.19.0',
'version' => '1.19.0.0',
+ 'reference' => '085241787d52fa6f7a774fd034135fef0cfd5496',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/polyfill-iconv',
'aliases' => array(),
- 'reference' => '085241787d52fa6f7a774fd034135fef0cfd5496',
'dev_requirement' => false,
),
'symfony/polyfill-intl-idn' => array(
'pretty_version' => 'v1.19.0',
'version' => '1.19.0.0',
+ 'reference' => '4ad5115c0f5d5172a9fe8147675ec6de266d8826',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/polyfill-intl-idn',
'aliases' => array(),
- 'reference' => '4ad5115c0f5d5172a9fe8147675ec6de266d8826',
'dev_requirement' => false,
),
'symfony/polyfill-intl-normalizer' => array(
'pretty_version' => 'v1.19.0',
'version' => '1.19.0.0',
+ 'reference' => '8db0ae7936b42feb370840cf24de1a144fb0ef27',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/polyfill-intl-normalizer',
'aliases' => array(),
- 'reference' => '8db0ae7936b42feb370840cf24de1a144fb0ef27',
'dev_requirement' => false,
),
'symfony/polyfill-mbstring' => array(
'pretty_version' => 'v1.19.0',
'version' => '1.19.0.0',
+ 'reference' => 'b5f7b932ee6fa802fc792eabd77c4c88084517ce',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/polyfill-mbstring',
'aliases' => array(),
- 'reference' => 'b5f7b932ee6fa802fc792eabd77c4c88084517ce',
'dev_requirement' => false,
),
'symfony/polyfill-php56' => array(
'pretty_version' => 'v1.19.0',
'version' => '1.19.0.0',
+ 'reference' => 'ea19621731cbd973a6702cfedef3419768bf3372',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/polyfill-php56',
'aliases' => array(),
- 'reference' => 'ea19621731cbd973a6702cfedef3419768bf3372',
'dev_requirement' => false,
),
'symfony/polyfill-php70' => array(
'pretty_version' => 'v1.19.0',
'version' => '1.19.0.0',
+ 'reference' => '3fe414077251a81a1b15b1c709faf5c2fbae3d4e',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/polyfill-php70',
'aliases' => array(),
- 'reference' => '3fe414077251a81a1b15b1c709faf5c2fbae3d4e',
'dev_requirement' => false,
),
'symfony/polyfill-php72' => array(
'pretty_version' => 'v1.19.0',
'version' => '1.19.0.0',
+ 'reference' => 'beecef6b463b06954638f02378f52496cb84bacc',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/polyfill-php72',
'aliases' => array(),
- 'reference' => 'beecef6b463b06954638f02378f52496cb84bacc',
'dev_requirement' => false,
),
'symfony/polyfill-util' => array(
'pretty_version' => 'v1.19.0',
'version' => '1.19.0.0',
+ 'reference' => '8df0c3e6a4b85df9a5c6f3f2f46fba5c5c47058a',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/polyfill-util',
'aliases' => array(),
- 'reference' => '8df0c3e6a4b85df9a5c6f3f2f46fba5c5c47058a',
'dev_requirement' => false,
),
'symfony/routing' => array(
'pretty_version' => 'v3.4.47',
'version' => '3.4.47.0',
+ 'reference' => '3e522ac69cadffd8131cc2b22157fa7662331a6c',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/routing',
'aliases' => array(),
- 'reference' => '3e522ac69cadffd8131cc2b22157fa7662331a6c',
'dev_requirement' => false,
),
'symfony/stopwatch' => array(
'pretty_version' => 'v3.4.47',
'version' => '3.4.47.0',
+ 'reference' => '298b81faad4ce60e94466226b2abbb8c9bca7462',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/stopwatch',
'aliases' => array(),
- 'reference' => '298b81faad4ce60e94466226b2abbb8c9bca7462',
'dev_requirement' => true,
),
'symfony/twig-bridge' => array(
'pretty_version' => 'v3.4.47',
'version' => '3.4.47.0',
+ 'reference' => '090d19d6f1ea5b9e1d79f372785aa5e5c9cd4042',
'type' => 'symfony-bridge',
'install_path' => __DIR__ . '/../symfony/twig-bridge',
'aliases' => array(),
- 'reference' => '090d19d6f1ea5b9e1d79f372785aa5e5c9cd4042',
'dev_requirement' => false,
),
'symfony/twig-bundle' => array(
'pretty_version' => 'v3.4.47',
'version' => '3.4.47.0',
+ 'reference' => '977b3096e2df96bc8a8d2329e83466cfc30c373d',
'type' => 'symfony-bundle',
'install_path' => __DIR__ . '/../symfony/twig-bundle',
'aliases' => array(),
- 'reference' => '977b3096e2df96bc8a8d2329e83466cfc30c373d',
'dev_requirement' => false,
),
'symfony/var-dumper' => array(
'pretty_version' => 'v3.4.47',
'version' => '3.4.47.0',
+ 'reference' => '0719f6cf4633a38b2c1585140998579ce23b4b7d',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/var-dumper',
'aliases' => array(),
- 'reference' => '0719f6cf4633a38b2c1585140998579ce23b4b7d',
'dev_requirement' => true,
),
'symfony/web-profiler-bundle' => array(
'pretty_version' => 'v3.4.47',
'version' => '3.4.47.0',
+ 'reference' => 'ccb83b3a508f4a683e44f571f127beebdc315ff9',
'type' => 'symfony-bundle',
'install_path' => __DIR__ . '/../symfony/web-profiler-bundle',
'aliases' => array(),
- 'reference' => 'ccb83b3a508f4a683e44f571f127beebdc315ff9',
'dev_requirement' => true,
),
'symfony/yaml' => array(
'pretty_version' => 'v3.4.47',
'version' => '3.4.47.0',
+ 'reference' => '88289caa3c166321883f67fe5130188ebbb47094',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/yaml',
'aliases' => array(),
- 'reference' => '88289caa3c166321883f67fe5130188ebbb47094',
'dev_requirement' => false,
),
'tecnickcom/tcpdf' => array(
@@ -638,28 +638,28 @@
'thenetworg/oauth2-azure' => array(
'pretty_version' => 'v2.0.1',
'version' => '2.0.1.0',
+ 'reference' => '2649422a0dc74af32d21d9d738d37abcd5b03998',
'type' => 'library',
'install_path' => __DIR__ . '/../thenetworg/oauth2-azure',
'aliases' => array(),
- 'reference' => '2649422a0dc74af32d21d9d738d37abcd5b03998',
'dev_requirement' => false,
),
'true/punycode' => array(
'pretty_version' => 'v2.1.1',
'version' => '2.1.1.0',
+ 'reference' => 'a4d0c11a36dd7f4e7cd7096076cab6d3378a071e',
'type' => 'library',
'install_path' => __DIR__ . '/../true/punycode',
'aliases' => array(),
- 'reference' => 'a4d0c11a36dd7f4e7cd7096076cab6d3378a071e',
'dev_requirement' => false,
),
'twig/twig' => array(
'pretty_version' => 'v1.42.5',
'version' => '1.42.5.0',
+ 'reference' => '87b2ea9d8f6fd014d0621ca089bb1b3769ea3f8e',
'type' => 'library',
'install_path' => __DIR__ . '/../twig/twig',
'aliases' => array(),
- 'reference' => '87b2ea9d8f6fd014d0621ca089bb1b3769ea3f8e',
'dev_requirement' => false,
),
'zendframework/zend-loader' => array(
diff --git a/setup/licenses/community-licenses.xml b/setup/licenses/community-licenses.xml
index b95ac4c07..bd13d53b0 100644
--- a/setup/licenses/community-licenses.xml
+++ b/setup/licenses/community-licenses.xml
@@ -1672,214 +1672,6 @@ Awesome, nor vice versa. **Please do not use brand logos for any purpose except
to represent the company, product, or service to which they refer.**
]]>
-
- apereo/phpcas
- Joachim Fritschi - Adam Franco
- Apache-2.0
-
-
C3 js
Masayuki Tanaka
diff --git a/setup/setuputils.class.inc.php b/setup/setuputils.class.inc.php
index d0b1e2c56..e80838e27 100644
--- a/setup/setuputils.class.inc.php
+++ b/setup/setuputils.class.inc.php
@@ -684,6 +684,7 @@ class SetupUtils
* Emulates sys_get_temp_dir if needed (PHP < 5.2.1)
*
* @return string Path to the system's temp directory
+ * @uses \sys_get_temp_dir()
*/
public static function GetTmpDir() {
return realpath(sys_get_temp_dir());
diff --git a/sources/Core/Authentication/Client/OAuth/OAuthClientProviderAbstract.php b/sources/Core/Authentication/Client/OAuth/OAuthClientProviderAbstract.php
index c227ce81a..d4d92c935 100644
--- a/sources/Core/Authentication/Client/OAuth/OAuthClientProviderAbstract.php
+++ b/sources/Core/Authentication/Client/OAuth/OAuthClientProviderAbstract.php
@@ -8,15 +8,8 @@ use OAuthClient;
abstract class OAuthClientProviderAbstract implements IOAuthClientProvider
{
-// /** @var string */
-// static protected $sVendorName = '';
-// /** @var array */
-// static protected $sVendorColors = ['', '', '', ''];
-// /** @var string */
-// static protected $sVendorIcon = '';
-// static protected $sRequiredSMTPScope = '';
-// static protected $sRequiredIMAPScope = '';
-// static protected $sRequiredPOPScope = '';
+ /** @var string */
+ static protected $sVendorName = '';
/** @var \League\OAuth2\Client\Provider\GenericProvider */
protected $oVendorProvider;
@@ -69,4 +62,12 @@ abstract class OAuthClientProviderAbstract implements IOAuthClientProvider
return $this->oOauthClient->GetScope();
}
+ /**
+ * @return string
+ */
+ public static function GetVendorName()
+ {
+ return self::$sVendorName;
+ }
+
}
\ No newline at end of file
diff --git a/sources/Core/Authentication/Client/OAuth/OAuthClientProviderAzure.php b/sources/Core/Authentication/Client/OAuth/OAuthClientProviderAzure.php
index e3c594101..667d5875a 100644
--- a/sources/Core/Authentication/Client/OAuth/OAuthClientProviderAzure.php
+++ b/sources/Core/Authentication/Client/OAuth/OAuthClientProviderAzure.php
@@ -6,16 +6,8 @@ use TheNetworg\OAuth2\Client\Provider\Azure;
class OAuthClientProviderAzure extends OAuthClientProviderAbstract
{
-// /** @var string */
-// static protected $sVendorName = 'Azure';
-// /** @var array */
-// static protected $sVendorColors = ['#0766b7', '#0d396b', '#2893df', '#3ccbf4'];
-// /** @var string */
-// static protected $sVendorIcon = '../images/icons/icons8-azure.svg';
-// static protected $sRequiredSMTPScope = 'https://outlook.office.com/SMTP.Send offline_access';
-// static protected $sRequiredIMAPScope = 'https://outlook.office.com/IMAP.AccessAsUser.All offline_access';
-// static protected $sRequiredPOPScope = 'https://outlook.office.com/POP.AccessAsUser.All offline access';
-
+ /** @var string */
+ static protected $sVendorName = 'Azure';
public function __construct($oOAuthClient, array $collaborators = [])
{
diff --git a/sources/Core/Authentication/Client/OAuth/OAuthClientProviderFactory.php b/sources/Core/Authentication/Client/OAuth/OAuthClientProviderFactory.php
index 58445c3b7..66230eb3e 100644
--- a/sources/Core/Authentication/Client/OAuth/OAuthClientProviderFactory.php
+++ b/sources/Core/Authentication/Client/OAuth/OAuthClientProviderFactory.php
@@ -43,8 +43,7 @@ class OAuthClientProviderFactory
throw new CoreException(Dict::Format('itop-oauth-client:MissingOAuthClient', $sUsername));
}
while ($oOAuthClient = $oSet->Fetch()) {
- $sScope = $oOAuthClient->Get('scope');
- if ($sScope == 'EMail') {
+ if ($oOAuthClient->Get('used_for_smtp') == 'yes') {
return $oOAuthClient;
}
}
diff --git a/sources/Core/Authentication/Client/OAuth/OAuthClientProviderGoogle.php b/sources/Core/Authentication/Client/OAuth/OAuthClientProviderGoogle.php
index 35ddafca8..838a8783e 100644
--- a/sources/Core/Authentication/Client/OAuth/OAuthClientProviderGoogle.php
+++ b/sources/Core/Authentication/Client/OAuth/OAuthClientProviderGoogle.php
@@ -6,16 +6,8 @@ use League\OAuth2\Client\Provider\Google;
class OAuthClientProviderGoogle extends OAuthClientProviderAbstract
{
-// /** @var string */
-// static protected $sVendorName = 'Google';
-// /** @var array */
-// static protected $sVendorColors = ['#DB4437', '#F4B400', '#0F9D58', '#4285F4'];
-// /** @var string */
-// static protected $sVendorIcon = '../images/icons/icons8-google.svg';
-//
-// static protected $sRequiredSMTPScope = 'https://mail.google.com/';
-// static protected $sRequiredIMAPScope = 'https://mail.google.com/';
-// static protected $sRequiredPOPScope = 'https://mail.google.com/';
+ /** @var string */
+ static protected $sVendorName = 'Google';
public function __construct($oOAuthClient, array $collaborators = [])
{