From 4712569a36b29ecfd1c8316b6666557870be6798 Mon Sep 17 00:00:00 2001 From: Pierre Goiffon Date: Wed, 29 Jun 2022 10:56:21 +0200 Subject: [PATCH 01/33] :memo: CONTRIBUTING : fix GitMoji link --- CONTRIBUTING.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c8d1a454b..ffa16522e 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 From 104beff158cc7698698959c71ff33e6c065eda49 Mon Sep 17 00:00:00 2001 From: Eric Espie Date: Wed, 29 Jun 2022 15:09:17 +0200 Subject: [PATCH 02/33] =?UTF-8?q?N=C2=B05102=20-=20Allow=20to=20send=20ema?= =?UTF-8?q?ils=20using=20GSuite=20SMTP=20and=20OAuth=20-=20Fix=20log?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/log.class.inc.php | 2 +- datamodels/2.x/itop-oauth-client/README.md | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/core/log.class.inc.php b/core/log.class.inc.php index 9facb1599..df525d863 100644 --- a/core/log.class.inc.php +++ b/core/log.class.inc.php @@ -698,7 +698,7 @@ abstract class LogAPI if (isset($sLogLevelMin[static::CHANNEL_DEFAULT])) { - return $sLogLevelMin[$sChannel]; + return $sLogLevelMin[static::CHANNEL_DEFAULT]; } return static::LEVEL_DEFAULT; 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. From 1b8e48539d7a93531b203987c994ac57a5320b2e Mon Sep 17 00:00:00 2001 From: Eric Espie Date: Fri, 1 Jul 2022 14:32:44 +0200 Subject: [PATCH 03/33] =?UTF-8?q?N=C2=B05102=20-=20Allow=20to=20send=20ema?= =?UTF-8?q?ils=20using=20GSuite=20SMTP=20and=20OAuth=20-=20Add=20comment?= =?UTF-8?q?=20in=20configuration?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/config.class.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/config.class.inc.php b/core/config.class.inc.php index af1e05c36..45efc63c6 100644 --- a/core/config.class.inc.php +++ b/core/config.class.inc.php @@ -509,7 +509,7 @@ class Config ), 'email_transport' => array( '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' => '', From b43e6d7af3ed468689c68b2d9c282e2c0f4db304 Mon Sep 17 00:00:00 2001 From: Stephen Abello Date: Mon, 4 Jul 2022 16:39:02 +0200 Subject: [PATCH 04/33] =?UTF-8?q?N=C2=B05071=20Fix=20properties=20tab=20on?= =?UTF-8?q?=20objects=20popup=20hiding=20in=20"..."=20overflowing=20button?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- js/layouts/tab-container/tab-container.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/layouts/tab-container/tab-container.js b/js/layouts/tab-container/tab-container.js index 24c5ae63e..45792e671 100644 --- a/js/layouts/tab-container/tab-container.js +++ b/js/layouts/tab-container/tab-container.js @@ -156,7 +156,7 @@ $(function() }); me._updateExtraTabsList(); }, { - root: $('.ibo-tab-container--tabs-list')[0], + root: this.element.find(this.js_selectors.tabs_list)[0], threshold: [0.9] // N°4783 Should be completely visible, but lowering the threshold prevents a bug in the JS Observer API when the window is zoomed in/out, in which case all items respond as being hidden even when they are not. }); this.element.find(this.js_selectors.tab_header).each(function(){ From 9fd2b7f4dad3c8105a61138f48a75306afa7342f Mon Sep 17 00:00:00 2001 From: Stephen Abello Date: Mon, 4 Jul 2022 16:41:10 +0200 Subject: [PATCH 05/33] =?UTF-8?q?N=C2=B05071=20Fix=20objects=20popup=20shr?= =?UTF-8?q?inking=20when=20scrolling?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/ui.extkeywidget.class.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/ui.extkeywidget.class.inc.php b/application/ui.extkeywidget.class.inc.php index 4cec8e222..b94a9bb96 100644 --- a/application/ui.extkeywidget.class.inc.php +++ b/application/ui.extkeywidget.class.inc.php @@ -973,7 +973,7 @@ HTML ); $oPage->add_ready_script(<<iId}').dialog({ width: 'auto', height: 'auto', maxHeight: $(window).height() - 50, autoOpen: false, modal: true}); +$('#ac_create_{$this->iId}').dialog({ width: $(window).width() * 0.6, height: 'auto', maxHeight: $(window).height() - 50, autoOpen: false, modal: true}); $('#dcr_{$this->iId} form').removeAttr('onsubmit'); $('#dcr_{$this->iId} form').on('submit.uilinksWizard', oACWidget_{$this->iId}.DoCreateObject); JS From d388c3fd3d2a11983b61d268b2323a4ff0d0dbcb Mon Sep 17 00:00:00 2001 From: Eric Espie Date: Mon, 4 Jul 2022 16:48:56 +0200 Subject: [PATCH 06/33] =?UTF-8?q?N=C2=B05102=20-=20Allow=20to=20send=20ema?= =?UTF-8?q?ils=20using=20GSuite=20SMTP=20and=20OAuth=20-=20Limit=20error?= =?UTF-8?q?=20size?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/asynctask.class.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/asynctask.class.inc.php b/core/asynctask.class.inc.php index 73e33dd1d..e48def4c7 100644 --- a/core/asynctask.class.inc.php +++ b/core/asynctask.class.inc.php @@ -230,7 +230,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()); From 8a99c372003cc180a0602d7949caa65373d00aa6 Mon Sep 17 00:00:00 2001 From: Pierre Goiffon Date: Tue, 5 Jul 2022 15:08:07 +0200 Subject: [PATCH 07/33] =?UTF-8?q?N=C2=B05287=20Fix=20composer.json=20error?= =?UTF-8?q?s=20See=20https://getcomposer.org/doc/03-cli.md#validate?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- composer.json | 4 +- composer.lock | 33 ++++++- lib/composer/InstalledVersions.php | 14 +-- lib/composer/installed.php | 140 ++++++++++++++--------------- 4 files changed, 112 insertions(+), 79 deletions(-) diff --git a/composer.json b/composer.json index bc31463b2..4ba32b41e 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.0.8", "ext-ctype": "*", diff --git a/composer.lock b/composer.lock index 4ddac4f33..234dfcd6c 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "3438e44ef160404089e3bfa9719f11dd", + "content-hash": "8415e71a4288813b5a5d82ec4a00216b", "packages": [ { "name": "combodo/tcpdf", @@ -1334,6 +1334,11 @@ "pseudorandom", "random" ], + "support": { + "email": "info@paragonie.com", + "issues": "https://github.com/paragonie/random_compat/issues", + "source": "https://github.com/paragonie/random_compat" + }, "time": "2019-01-03T20:59:08+00:00" }, { @@ -1461,6 +1466,10 @@ } ], "description": "More info available on: http://pear.php.net/package/Console_Getopt", + "support": { + "issues": "http://pear.php.net/bugs/search.php?cmd=display&package_name[]=Console_Getopt", + "source": "https://github.com/pear/Console_Getopt" + }, "time": "2019-11-20T18:27:48+00:00" }, { @@ -1505,6 +1514,10 @@ } ], "description": "Minimal set of PEAR core files to be used as composer dependency", + "support": { + "issues": "http://pear.php.net/bugs/search.php?cmd=display&package_name[]=PEAR", + "source": "https://github.com/pear/pear-core-minimal" + }, "time": "2019-11-19T19:00:24+00:00" }, { @@ -1560,6 +1573,10 @@ "keywords": [ "exception" ], + "support": { + "issues": "http://pear.php.net/bugs/search.php?cmd=display&package_name[]=PEAR_Exception", + "source": "https://github.com/pear/PEAR_Exception" + }, "time": "2019-12-10T10:24:42+00:00" }, { @@ -1684,6 +1701,9 @@ "psr", "psr-6" ], + "support": { + "source": "https://github.com/php-fig/cache/tree/master" + }, "time": "2016-08-06T20:24:11+00:00" }, { @@ -1733,6 +1753,10 @@ "container-interop", "psr" ], + "support": { + "issues": "https://github.com/php-fig/container/issues", + "source": "https://github.com/php-fig/container/tree/master" + }, "time": "2017-02-14T16:28:37+00:00" }, { @@ -1833,6 +1857,9 @@ "psr", "psr-3" ], + "support": { + "source": "https://github.com/php-fig/log/tree/1.1.2" + }, "time": "2019-11-01T11:05:21+00:00" }, { @@ -1881,6 +1908,9 @@ "psr-16", "simple-cache" ], + "support": { + "source": "https://github.com/php-fig/simple-cache/tree/master" + }, "time": "2017-10-23T01:57:42+00:00" }, { @@ -2509,6 +2539,7 @@ "type": "tidelift" } ], + "abandoned": "symfony/error-handler", "time": "2020-10-24T10:57:07+00:00" }, { diff --git a/lib/composer/InstalledVersions.php b/lib/composer/InstalledVersions.php index 41bc143c1..c6b54af7b 100644 --- a/lib/composer/InstalledVersions.php +++ b/lib/composer/InstalledVersions.php @@ -28,7 +28,7 @@ class InstalledVersions { /** * @var mixed[]|null - * @psalm-var array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array}|array{}|null + * @psalm-var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array}|array{}|null */ private static $installed; @@ -39,7 +39,7 @@ class InstalledVersions /** * @var array[] - * @psalm-var array}> + * @psalm-var array}> */ private static $installedByVendor = array(); @@ -243,7 +243,7 @@ class InstalledVersions /** * @return array - * @psalm-return array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string} + * @psalm-return array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool} */ public static function getRootPackage() { @@ -257,7 +257,7 @@ class InstalledVersions * * @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect. * @return array[] - * @psalm-return array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array} + * @psalm-return array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array} */ public static function getRawData() { @@ -280,7 +280,7 @@ class InstalledVersions * Returns the raw data of all installed.php which are currently loaded for custom implementations * * @return array[] - * @psalm-return list}> + * @psalm-return list}> */ public static function getAllRawData() { @@ -303,7 +303,7 @@ class InstalledVersions * @param array[] $data A vendor/composer/installed.php data set * @return void * - * @psalm-param array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array} $data + * @psalm-param array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array} $data */ public static function reload($data) { @@ -313,7 +313,7 @@ class InstalledVersions /** * @return array[] - * @psalm-return list}> + * @psalm-return list}> */ private static function getInstalled() { 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( From 48957fd2f02066672b933870412b25e57d50611e Mon Sep 17 00:00:00 2001 From: Eric Espie Date: Tue, 5 Jul 2022 17:37:49 +0200 Subject: [PATCH 08/33] =?UTF-8?q?N=C2=B05102=20-=20Allow=20to=20send=20ema?= =?UTF-8?q?ils=20using=20GSuite=20SMTP=20and=20OAuth=20-=20refactor=20scop?= =?UTF-8?q?es?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr.dict.itop-core-update.php | 2 +- .../datamodel.itop-oauth-client.xml | 658 ++++++++++++++++-- .../en.dict.itop-oauth-client.php | 45 +- .../fr.dict.itop-oauth-client.php | 51 +- .../module.itop-oauth-client.php | 2 - .../src/Model/OAuthClientAzure.php | 128 ---- .../src/Model/OAuthClientGoogle.php | 134 ---- .../src/Service/PopupMenuExtension.php | 4 +- lib/autoload.php | 5 - lib/composer/ClassLoader.php | 2 +- lib/composer/autoload_classmap.php | 2 +- lib/composer/autoload_files.php | 10 +- lib/composer/autoload_namespaces.php | 2 +- lib/composer/autoload_psr4.php | 2 +- lib/composer/autoload_real.php | 30 +- lib/composer/autoload_static.php | 8 +- lib/composer/include_paths.php | 2 +- .../OAuth/OAuthClientProviderFactory.php | 4 +- 18 files changed, 712 insertions(+), 379 deletions(-) delete mode 100644 datamodels/2.x/itop-oauth-client/src/Model/OAuthClientAzure.php delete mode 100644 datamodels/2.x/itop-oauth-client/src/Model/OAuthClientGoogle.php diff --git a/datamodels/2.x/itop-core-update/fr.dict.itop-core-update.php b/datamodels/2.x/itop-core-update/fr.dict.itop-core-update.php index fb80f2644..29f39993c 100644 --- a/datamodels/2.x/itop-core-update/fr.dict.itop-core-update.php +++ b/datamodels/2.x/itop-core-update/fr.dict.itop-core-update.php @@ -73,7 +73,7 @@ Dict::Add('FR FR', 'French', 'Français', array( 'iTopUpdate:UI:CanCoreUpdate:ErrorFileNotExist' => 'Échec de la vérification des fichiers (Fichier manquant %1$s)', 'iTopUpdate:UI:CanCoreUpdate:Failed' => 'Échec de la vérification des fichiers', 'iTopUpdate:UI:CanCoreUpdate:Yes' => 'L\'application peut être mise à jour', - 'iTopUpdate:UI:CanCoreUpdate:No' => 'L\'application ne peut pas être mise à jour : %1$s', + 'iTopUpdate:UI:CanCoreUpdate:No' => 'L\'application ne peut pas être mise à jour : %1$s', 'iTopUpdate:UI:CanCoreUpdate:Warning' => 'Attention : la mise à jour de l\'application peut échouer : %1$s', 'iTopUpdate:UI:CannotUpdateUseSetup' => 'Des fichiers modifiés ont été détectés, une mise à jour partielle ne peut pas être effectuée.
Suivez la procedure pour mettre à jour manuellement votre iTop. Vous devez utiliser la page d\'installation pour mettre à jour l\'application.', 'iTopUpdate:UI:CheckInProgress'=>'Veuillez patienter pendant la vérification d\'intégrité', 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 a40a51436..b141584bb 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 @@ -105,22 +105,22 @@ 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(); + $aScopes = $this->Get('scope')->GetValues(); + if ($this->Get('status') == 'inactive') { + $oPage->p(''.Dict::S('itop-oauth-client:Message:MissingToken').''); + } elseif (in_array('SMTP', $aScopes) && $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"); + } + } + } ]]> @@ -128,14 +128,14 @@ public Overload-DBObject @@ -143,68 +143,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(); + } ]]> @@ -266,6 +266,544 @@ + + OAuthClient + + cloud,searchable + false + autoincrement + priv_oauth_client_azure + id + + + + + + + + + + + + + + + + + + + + + true + + + + + + + + true + + + + + + true + + SMTP + IMAP + + scope + SMTP,IMAP + true + + + advanced_scope + + true + + + true + + simple + advanced + + used_scope + simple + false + + + + + + + +
+ + + 10 + + + 10 + + + 10 + + + 20 + + + 30 + + + 40 + + + 50 + + + 60 + + + 70 + + + 80 + + + + + + + 20 + + + 10 + + + 10 + + + 20 + + + 30 + + + + + + +
+ + + + 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 + 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 + + cloud,searchable + false + autoincrement + priv_oauth_client_google + id + + + + + + + + + + + + + + + + + + + + + true + + + + + + + + true + + + + + + true + + SMTP + IMAP + + scope + SMTP,IMAP + true + + + advanced_scope + + true + + + true + + simple + advanced + + used_scope + simple + false + + + + + + + +
+ + + 10 + + + 10 + + + 10 + + + 20 + + + 30 + + + 40 + + + 50 + + + 60 + + + 70 + + + 80 + + + + + + + 20 + + + 10 + + + 10 + + + 20 + + + 30 + + + + + + +
+ + + + 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 + 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..510e01cbe 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,9 @@ 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:baseinfo' => 'Base Information', + 'OAuthClient:scope' => 'Scope', ]); // @@ -33,8 +36,6 @@ Dict::Add('EN US', 'English', 'English', [ '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:status' => 'Status', 'Class:OAuthClient/Attribute:status+' => '', 'Class:OAuthClient/Attribute:status/Value:active' => 'Access token generated', @@ -62,17 +63,45 @@ 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+' => '', + '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+' => '', + '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: 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+' => '', + '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+' => '', + '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+' => '', +)); 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..82837874b 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 @@ -20,6 +20,9 @@ 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:baseinfo' => 'Information', + 'OAuthClient:scope' => 'Scope', ]); // @@ -32,8 +35,10 @@ Dict::Add('FR FR', 'French', 'Français', [ '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:status' => 'Statut', + 'Class:OAuthClient/Attribute:status+' => '', + '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', @@ -57,22 +62,44 @@ 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+' => '', + '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+' => '', + '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: 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+' => '', + '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+' => '', + '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+' => '', )); 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 632ede130..e0c681df8 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,8 +25,6 @@ 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', ), '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/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/lib/autoload.php b/lib/autoload.php index 64168f99a..79c1600b5 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 ComposerAutoloaderInit0018331147de7601e7552f7da8e3bb8b::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 e104d3fc3..08653fc66 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 752e35fbd..661cd2543 100644 --- a/lib/composer/autoload_real.php +++ b/lib/composer/autoload_real.php @@ -25,20 +25,33 @@ class ComposerAutoloaderInit0018331147de7601e7552f7da8e3bb8b require __DIR__ . '/platform_check.php'; spl_autoload_register(array('ComposerAutoloaderInit0018331147de7601e7552f7da8e3bb8b', 'loadClassLoader'), true, true); - self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); + 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\ComposerStaticInit0018331147de7601e7552f7da8e3bb8b::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\ComposerStaticInit0018331147de7601e7552f7da8e3bb8b::$files; + if ($useStaticLoader) { + $includeFiles = Composer\Autoload\ComposerStaticInit0018331147de7601e7552f7da8e3bb8b::$files; + } else { + $includeFiles = require __DIR__ . '/autoload_files.php'; + } foreach ($includeFiles as $fileIdentifier => $file) { composerRequire0018331147de7601e7552f7da8e3bb8b($fileIdentifier, $file); } @@ -47,16 +60,11 @@ class ComposerAutoloaderInit0018331147de7601e7552f7da8e3bb8b } } -/** - * @param string $fileIdentifier - * @param string $file - * @return void - */ 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 647f5274a..d7b35becd 100644 --- a/lib/composer/autoload_static.php +++ b/lib/composer/autoload_static.php @@ -8,21 +8,21 @@ class ComposerStaticInit0018331147de7601e7552f7da8e3bb8b { 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/sources/Core/Authentication/Client/OAuth/OAuthClientProviderFactory.php b/sources/Core/Authentication/Client/OAuth/OAuthClientProviderFactory.php index 58445c3b7..7d5f3b721 100644 --- a/sources/Core/Authentication/Client/OAuth/OAuthClientProviderFactory.php +++ b/sources/Core/Authentication/Client/OAuth/OAuthClientProviderFactory.php @@ -43,8 +43,8 @@ class OAuthClientProviderFactory throw new CoreException(Dict::Format('itop-oauth-client:MissingOAuthClient', $sUsername)); } while ($oOAuthClient = $oSet->Fetch()) { - $sScope = $oOAuthClient->Get('scope'); - if ($sScope == 'EMail') { + $aScopes = $oOAuthClient->Get('scope')->GetValues(); + if (in_array('SMTP', $aScopes)) { return $oOAuthClient; } } From 237b181eeca845ad45466a835d0d420c94b22e0a Mon Sep 17 00:00:00 2001 From: Pierre Goiffon Date: Tue, 5 Jul 2022 18:09:59 +0200 Subject: [PATCH 09/33] :bulb: Fix \SetupUtils::GetTmpDir PHPDoc --- setup/setuputils.class.inc.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setup/setuputils.class.inc.php b/setup/setuputils.class.inc.php index c746ca225..15c821ece 100644 --- a/setup/setuputils.class.inc.php +++ b/setup/setuputils.class.inc.php @@ -588,8 +588,9 @@ class SetupUtils /** * Helper function to retrieve the system's temporary directory - * 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() { From c759856a617703d6754cfc6c2e1ceaadc11e84e9 Mon Sep 17 00:00:00 2001 From: Eric Espie Date: Wed, 6 Jul 2022 10:10:29 +0200 Subject: [PATCH 10/33] =?UTF-8?q?N=C2=B05102=20-=20Allow=20to=20send=20ema?= =?UTF-8?q?ils=20using=20GSuite=20SMTP=20and=20OAuth=20-=20Highlight=20cla?= =?UTF-8?q?sses?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../module.itop-oauth-client.php | 1 + .../src/Service/ApplicationUIExtension.php | 29 +++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 datamodels/2.x/itop-oauth-client/src/Service/ApplicationUIExtension.php 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 From f40141072a9bf6667fd090a70f1be71b31a3ff8f Mon Sep 17 00:00:00 2001 From: Eric Espie Date: Wed, 6 Jul 2022 14:10:01 +0200 Subject: [PATCH 11/33] =?UTF-8?q?N=C2=B05102=20-=20Allow=20to=20send=20ema?= =?UTF-8?q?ils=20using=20GSuite=20SMTP=20and=20OAuth=20-=20Fix=20errors=20?= =?UTF-8?q?on=20vendor=20name?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../OAuth/OAuthClientProviderAbstract.php | 19 ++++++++++--------- .../Client/OAuth/OAuthClientProviderAzure.php | 12 ++---------- .../OAuth/OAuthClientProviderGoogle.php | 12 ++---------- 3 files changed, 14 insertions(+), 29 deletions(-) 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/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 = []) { From a0553e11956b50448422087260290394d1f4b49e Mon Sep 17 00:00:00 2001 From: Eric Espie Date: Wed, 6 Jul 2022 17:10:59 +0200 Subject: [PATCH 12/33] =?UTF-8?q?N=C2=B05102=20-=20Allow=20to=20send=20ema?= =?UTF-8?q?ils=20using=20GSuite=20SMTP=20and=20OAuth=20-=20Highlight=20cla?= =?UTF-8?q?sses?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/Service/ApplicationUIExtension.php | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/datamodels/2.x/itop-oauth-client/src/Service/ApplicationUIExtension.php b/datamodels/2.x/itop-oauth-client/src/Service/ApplicationUIExtension.php index 80135ed2f..7a43c29de 100644 --- a/datamodels/2.x/itop-oauth-client/src/Service/ApplicationUIExtension.php +++ b/datamodels/2.x/itop-oauth-client/src/Service/ApplicationUIExtension.php @@ -14,14 +14,16 @@ class ApplicationUIExtension extends AbstractApplicationUIExtension public function GetHilightClass($oObject) { - // Possible return values are: - // HILIGHT_CLASS_CRITICAL, HILIGHT_CLASS_WARNING, HILIGHT_CLASS_OK, HILIGHT_CLASS_NONE - $oConfig = utils::GetConfig(); - $aScopes = $oObject->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; + if ($oObject instanceof OAuthClient) { + // Possible return values are: + // HILIGHT_CLASS_CRITICAL, HILIGHT_CLASS_WARNING, HILIGHT_CLASS_OK, HILIGHT_CLASS_NONE + $oConfig = utils::GetConfig(); + $aScopes = $oObject->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; From 20fb7b241f78a261b1bf0c048f36246966a93078 Mon Sep 17 00:00:00 2001 From: Eric Espie Date: Wed, 6 Jul 2022 17:23:44 +0200 Subject: [PATCH 13/33] =?UTF-8?q?N=C2=B05102=20-=20Allow=20to=20send=20ema?= =?UTF-8?q?ils=20using=20GSuite=20SMTP=20and=20OAuth=20-=20Highlight=20cla?= =?UTF-8?q?sses?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../2.x/itop-oauth-client/src/Service/ApplicationUIExtension.php | 1 + 1 file changed, 1 insertion(+) diff --git a/datamodels/2.x/itop-oauth-client/src/Service/ApplicationUIExtension.php b/datamodels/2.x/itop-oauth-client/src/Service/ApplicationUIExtension.php index 7a43c29de..4ab73d852 100644 --- a/datamodels/2.x/itop-oauth-client/src/Service/ApplicationUIExtension.php +++ b/datamodels/2.x/itop-oauth-client/src/Service/ApplicationUIExtension.php @@ -7,6 +7,7 @@ namespace Combodo\iTop\OAuthClient\Service; use AbstractApplicationUIExtension; +use OAuthClient; use utils; class ApplicationUIExtension extends AbstractApplicationUIExtension From 8e850584953c4ed18757c21303fe7e9f2f46db6b Mon Sep 17 00:00:00 2001 From: Stephen Abello Date: Thu, 7 Jul 2022 09:15:20 +0200 Subject: [PATCH 14/33] Fix SCSS comment type --- css/backoffice/components/input/_input-one-way-password.scss | 2 +- css/backoffice/vendors/_selectize.scss | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/css/backoffice/components/input/_input-one-way-password.scss b/css/backoffice/components/input/_input-one-way-password.scss index 57a5feecb..f2a3404d0 100644 --- a/css/backoffice/components/input/_input-one-way-password.scss +++ b/css/backoffice/components/input/_input-one-way-password.scss @@ -1,4 +1,4 @@ -/*! +/* * @copyright Copyright (C) 2010-2021 Combodo SARL * @license http://opensource.org/licenses/AGPL-3.0 */ diff --git a/css/backoffice/vendors/_selectize.scss b/css/backoffice/vendors/_selectize.scss index 52851505a..ea917cd4d 100644 --- a/css/backoffice/vendors/_selectize.scss +++ b/css/backoffice/vendors/_selectize.scss @@ -1,4 +1,4 @@ -/*! +/* * @copyright Copyright (C) 2010-2021 Combodo SARL * @license http://opensource.org/licenses/AGPL-3.0 */ From 65c6e99a3f219b707946b80a467d7c806ec0ea93 Mon Sep 17 00:00:00 2001 From: Stephen Abello Date: Thu, 7 Jul 2022 09:16:11 +0200 Subject: [PATCH 15/33] Fix typo/useless comment --- application/utils.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/utils.inc.php b/application/utils.inc.php index 175181952..ce2fc43a8 100644 --- a/application/utils.inc.php +++ b/application/utils.inc.php @@ -1942,7 +1942,7 @@ class utils */ public static function CompileCSSFromSASS($sSassContent, $aImportPaths = array(), $aVariables = array()) { - $oSass = new Compiler();//['checkImportResolutions'=>true]); + $oSass = new Compiler(); $oSass->setOutputStyle(OutputStyle::COMPRESSED); // Setting our variables $aCssVariable = []; From c25a4a73464bafa7bb50d68fcbc52175e328e217 Mon Sep 17 00:00:00 2001 From: Eric Espie Date: Thu, 7 Jul 2022 14:17:09 +0200 Subject: [PATCH 16/33] =?UTF-8?q?N=C2=B05102=20-=20Allow=20to=20send=20ema?= =?UTF-8?q?ils=20using=20GSuite=20SMTP=20and=20OAuth=20-=20Access=20rights?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../itop-oauth-client/datamodel.itop-oauth-client.xml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) 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 b141584bb..d950e034c 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 @@ -269,7 +269,7 @@ OAuthClient - cloud,searchable + grant_by_profile,application false autoincrement priv_oauth_client_azure @@ -538,7 +538,7 @@ OAuthClient - cloud,searchable + grant_by_profile,application false autoincrement priv_oauth_client_google @@ -818,6 +818,11 @@ + + + + + From 24d19cd8d6c7d4f3563807b3d59b1686e6c27bd0 Mon Sep 17 00:00:00 2001 From: Eric Espie Date: Thu, 7 Jul 2022 16:34:19 +0200 Subject: [PATCH 17/33] =?UTF-8?q?N=C2=B05102=20-=20Allow=20to=20send=20ema?= =?UTF-8?q?ils=20using=20GSuite=20SMTP=20and=20OAuth=20-=20Add=20a=20flag?= =?UTF-8?q?=20to=20select=20OAuth=20client=20for=20SMTP=20usage?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../datamodel.itop-oauth-client.xml | 89 ++++++++++++++++--- .../en.dict.itop-oauth-client.php | 10 +++ .../fr.dict.itop-oauth-client.php | 11 +++ .../src/Service/ApplicationUIExtension.php | 3 +- .../OAuth/OAuthClientProviderFactory.php | 3 +- 5 files changed, 98 insertions(+), 18 deletions(-) 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 d950e034c..c1ed17ac4 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 @@ -110,10 +110,9 @@ parent::DisplayBareHeader($oPage, $bEditMode); if (!$bEditMode) { $oConfig = utils::GetConfig(); - $aScopes = $this->Get('scope')->GetValues(); if ($this->Get('status') == 'inactive') { $oPage->p(''.Dict::S('itop-oauth-client:Message:MissingToken').''); - } elseif (in_array('SMTP', $aScopes) && $oConfig->Get('email_transport_smtp.username') == $this->Get('name')) { + } 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'; @@ -290,12 +289,6 @@ - - - - - true - @@ -336,6 +329,16 @@ + + true + + yes + no + + used_for_smtp + no + true +
@@ -389,6 +392,9 @@ 30 + + 40 + @@ -435,6 +441,30 @@ } ]]> + + 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 @@ -559,12 +589,6 @@ - - - - - true - @@ -605,6 +629,16 @@ + + true + + yes + no + + used_for_smtp + no + true +
@@ -658,6 +692,9 @@ 30 + + 40 + @@ -704,6 +741,30 @@ } ]]> + + 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 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 510e01cbe..c93f56053 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 @@ -22,6 +22,8 @@ Dict::Add('EN US', 'English', 'English', [ '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', ]); @@ -81,6 +83,10 @@ Dict::Add('EN US', 'English', 'English', array( '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+' => '', + 'Class:OAuthClientAzure/Attribute:used_for_smtp/Value:yes' => 'Yes', + 'Class:OAuthClientAzure/Attribute:used_for_smtp/Value:no' => 'No', )); // @@ -104,4 +110,8 @@ Dict::Add('EN US', 'English', 'English', array( '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+' => '', + '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 82837874b..c023795f1 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', @@ -21,6 +22,8 @@ Dict::Add('FR FR', 'French', 'Français', [ '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', ]); @@ -80,6 +83,10 @@ Dict::Add('FR FR', 'French', 'Français', array( '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+' => '', + 'Class:OAuthClientAzure/Attribute:used_for_smtp/Value:yes' => 'Oui', + 'Class:OAuthClientAzure/Attribute:used_for_smtp/Value:no' => 'Non', )); // @@ -102,4 +109,8 @@ Dict::Add('FR FR', 'French', 'Français', array( '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+' => '', + '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/src/Service/ApplicationUIExtension.php b/datamodels/2.x/itop-oauth-client/src/Service/ApplicationUIExtension.php index 4ab73d852..7fb0b8a53 100644 --- a/datamodels/2.x/itop-oauth-client/src/Service/ApplicationUIExtension.php +++ b/datamodels/2.x/itop-oauth-client/src/Service/ApplicationUIExtension.php @@ -19,10 +19,9 @@ class ApplicationUIExtension extends AbstractApplicationUIExtension // Possible return values are: // HILIGHT_CLASS_CRITICAL, HILIGHT_CLASS_WARNING, HILIGHT_CLASS_OK, HILIGHT_CLASS_NONE $oConfig = utils::GetConfig(); - $aScopes = $oObject->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')) { + } elseif ($oObject->Get('used_for_smtp') == 'yes' && $oConfig->Get('email_transport_smtp.username') == $oObject->Get('name')) { return HILIGHT_CLASS_OK; } } diff --git a/sources/Core/Authentication/Client/OAuth/OAuthClientProviderFactory.php b/sources/Core/Authentication/Client/OAuth/OAuthClientProviderFactory.php index 7d5f3b721..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()) { - $aScopes = $oOAuthClient->Get('scope')->GetValues(); - if (in_array('SMTP', $aScopes)) { + if ($oOAuthClient->Get('used_for_smtp') == 'yes') { return $oOAuthClient; } } From 1a225bf55ba439b4198e0a32f020dde4cdb4e618 Mon Sep 17 00:00:00 2001 From: Eric Espie Date: Thu, 7 Jul 2022 17:57:24 +0200 Subject: [PATCH 18/33] =?UTF-8?q?N=C2=B05102=20-=20Allow=20to=20send=20ema?= =?UTF-8?q?ils=20using=20GSuite=20SMTP=20and=20OAuth=20-=20Access=20rights?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- datamodels/2.x/itop-oauth-client/ajax.php | 3 +-- .../2.x/itop-oauth-client/datamodel.itop-oauth-client.xml | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) 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 c1ed17ac4..c39eb2f1d 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 @@ -874,7 +874,7 @@ 1 0 OAuthClient - UR_ACTION_READ + UR_ACTION_MODIFY
From 8b0154cc623f74695abb65fa251355ce858298e2 Mon Sep 17 00:00:00 2001 From: bdalsass <95754414+bdalsass@users.noreply.github.com> Date: Fri, 8 Jul 2022 09:51:20 +0200 Subject: [PATCH 19/33] =?UTF-8?q?N=C2=B05168=20-=20Access=20to=20unauthori?= =?UTF-8?q?zed=20contact=20information=20on=20Portal=20(#305)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit GlobalRequestMgmt issue --- .../2.x/itop-portal-base/portal/src/Form/ObjectFormManager.php | 2 +- .../portal/src/Helper/ObjectFormHandlerHelper.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 f354ee5d2..550366661 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 b6361b417..bbb97cad6 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 @@ -451,7 +451,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'])){ From 33054d306deb3a5588c4cc97e0c407dcb8e201a5 Mon Sep 17 00:00:00 2001 From: bdalsass <95754414+bdalsass@users.noreply.github.com> Date: Fri, 8 Jul 2022 10:27:52 +0200 Subject: [PATCH 20/33] =?UTF-8?q?N=C2=B05302=20-=20Replace=20deprecated=20?= =?UTF-8?q?php=20strlen=20usages=20(#308)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/menunode.class.inc.php | 5 +--- application/utils.inc.php | 30 +++++++++++++++++++ core/metamodel.class.php | 14 ++++----- core/ormStyle.class.inc.php | 24 +++++++-------- .../Component/Button/ButtonUIBlockFactory.php | 4 +-- .../Base/Component/Input/InputWithLabel.php | 2 +- 6 files changed, 53 insertions(+), 26 deletions(-) diff --git a/application/menunode.class.inc.php b/application/menunode.class.inc.php index 60a0edef8..2e71abbc3 100644 --- a/application/menunode.class.inc.php +++ b/application/menunode.class.inc.php @@ -5,8 +5,6 @@ */ use Combodo\iTop\Application\Helper\WebResourcesHelper; -use Combodo\iTop\Application\UI\Base\Component\Title\Title; -use Combodo\iTop\Application\UI\Base\Component\Title\TitleUIBlockFactory; require_once(APPROOT.'/application/utils.inc.php'); require_once(APPROOT.'/application/template.class.inc.php'); @@ -655,8 +653,7 @@ abstract class MenuNode $this->sMenuId = $sMenuId; $this->iParentIndex = $iParentIndex; $this->aReflectionProperties = array(); - if (utils::StrLen($sEnableClass) > 0) - { + if (utils::IsNotNullOrEmptyString($sEnableClass)) { $this->aReflectionProperties['enable_class'] = $sEnableClass; $this->aReflectionProperties['enable_action'] = $iActionCode; $this->aReflectionProperties['enable_permission'] = $iAllowedResults; diff --git a/application/utils.inc.php b/application/utils.inc.php index ce2fc43a8..a9a4ce10c 100644 --- a/application/utils.inc.php +++ b/application/utils.inc.php @@ -2855,6 +2855,36 @@ HTML; return strlen($sString ?? ''); } + /** + * Helper around the native strlen() PHP method to test a string for null or empty value + * + * @link https://www.php.net/releases/8.1/en.php#deprecations_and_bc_breaks "Passing null to non-nullable internal function parameters is deprecated" + * + * @param string|null $sString + * + * @return boolean if string null or empty + * @since 3.0.2 N°5302 + */ + public static function IsNullOrEmptyString(?string $sString): boolean + { + return $sString == null || strlen($sString) == 0; + } + + /** + * Helper around the native strlen() PHP method to test a string not null or empty value + * + * @link https://www.php.net/releases/8.1/en.php#deprecations_and_bc_breaks "Passing null to non-nullable internal function parameters is deprecated" + * + * @param string|null $sString + * + * @return boolean if string is not null and not empty + * @since 3.0.2 N°5302 + */ + public static function IsNotNullOrEmptyString(?string $sString): boolean + { + return !static::IsNullOrEmptyString($sString); + } + //---------------------------------------------- // Environment helpers //---------------------------------------------- diff --git a/core/metamodel.class.php b/core/metamodel.class.php index 2d95a5bcd..658774d31 100644 --- a/core/metamodel.class.php +++ b/core/metamodel.class.php @@ -461,7 +461,7 @@ abstract class MetaModel $oStyle = self::$m_aClassParams[$sClass]['style']; $sIcon = $oStyle->GetIconAsAbsUrl(); } - if (utils::StrLen($sIcon) == 0) { + if (utils::IsNullOrEmptyString($sIcon)) { $sParentClass = self::GetParentPersistentClass($sClass); if (strlen($sParentClass) > 0) { return self::GetClassIcon($sParentClass, $bImgTag, $sMoreStyles); @@ -494,7 +494,7 @@ abstract class MetaModel $oStyle = new ormStyle("ibo-class-style--$sClass", "ibo-class-style-alt--$sClass"); } - if ((utils::StrLen($oStyle->GetMainColor()) > 0) && (utils::StrLen($oStyle->GetComplementaryColor()) > 0) && (utils::StrLen($oStyle->GetIconAsRelPath()) > 0)) { + if (utils::IsNotNullOrEmptyString($oStyle->GetMainColor()) && utils::IsNotNullOrEmptyString($oStyle->GetComplementaryColor()) && utils::IsNotNullOrEmptyString($oStyle->GetIconAsRelPath())) { // all the parameters are set, no need to search in the parent classes return $oStyle; } @@ -504,18 +504,18 @@ abstract class MetaModel while (strlen($sParentClass) > 0) { $oParentStyle = self::GetClassStyle($sParentClass); if (!is_null($oParentStyle)) { - if (utils::StrLen($oStyle->GetMainColor()) == 0) { + if (utils::IsNullOrEmptyString($oStyle->GetMainColor())) { $oStyle->SetMainColor($oParentStyle->GetMainColor()); $oStyle->SetStyleClass($oParentStyle->GetStyleClass()); } - if (utils::StrLen($oStyle->GetComplementaryColor()) == 0) { + if (utils::IsNullOrEmptyString($oStyle->GetComplementaryColor())) { $oStyle->SetComplementaryColor($oParentStyle->GetComplementaryColor()); $oStyle->SetAltStyleClass($oParentStyle->GetAltStyleClass()); } - if (utils::StrLen($oStyle->GetIconAsRelPath()) == 0) { + if (utils::IsNullOrEmptyString($oStyle->GetIconAsRelPath())) { $oStyle->SetIcon($oParentStyle->GetIconAsRelPath()); } - if ((utils::StrLen($oStyle->GetMainColor()) > 0) && (utils::StrLen($oStyle->GetComplementaryColor()) > 0) && (utils::StrLen($oStyle->GetIconAsRelPath()) > 0)) { + if (utils::IsNotNullOrEmptyString($oStyle->GetMainColor()) && utils::IsNotNullOrEmptyString($oStyle->GetComplementaryColor()) && utils::IsNotNullOrEmptyString($oStyle->GetIconAsRelPath())) { // all the parameters are set, no need to search in the parent classes return $oStyle; } @@ -523,7 +523,7 @@ abstract class MetaModel $sParentClass = self::GetParentPersistentClass($sParentClass); } - if ((utils::StrLen($oStyle->GetMainColor()) == 0) && (utils::StrLen($oStyle->GetComplementaryColor()) == 0) && (utils::StrLen($oStyle->GetIconAsRelPath()) == 0)) { + if (utils::IsNullOrEmptyString($oStyle->GetMainColor()) && utils::IsNullOrEmptyString($oStyle->GetComplementaryColor()) && utils::IsNullOrEmptyString($oStyle->GetIconAsRelPath())) { return null; } diff --git a/core/ormStyle.class.inc.php b/core/ormStyle.class.inc.php index 8f3b02abf..dabbd59bd 100644 --- a/core/ormStyle.class.inc.php +++ b/core/ormStyle.class.inc.php @@ -50,7 +50,7 @@ class ormStyle */ public function HasMainColor(): bool { - return utils::StrLen($this->sMainColor) > 0; + return utils::IsNotNullOrEmptyString($this->sMainColor); } /** @@ -68,7 +68,7 @@ class ormStyle */ public function SetMainColor(?string $sMainColor) { - $this->sMainColor = (utils::StrLen($sMainColor) === 0) ? null : $sMainColor; + $this->sMainColor = utils::IsNullOrEmptyString($sMainColor) ? null : $sMainColor; return $this; } @@ -78,7 +78,7 @@ class ormStyle */ public function HasComplementaryColor(): bool { - return utils::StrLen($this->sComplementaryColor) > 0; + return utils::IsNotNullOrEmptyString($this->sComplementaryColor); } /** @@ -96,7 +96,7 @@ class ormStyle */ public function SetComplementaryColor(?string $sComplementaryColor) { - $this->sComplementaryColor = (utils::StrLen($sComplementaryColor) === 0) ? null : $sComplementaryColor; + $this->sComplementaryColor = utils::IsNullOrEmptyString($sComplementaryColor) ? null : $sComplementaryColor; return $this; } @@ -116,7 +116,7 @@ class ormStyle */ public function HasStyleClass(): bool { - return utils::StrLen($this->sStyleClass) > 0; + return utils::IsNotNullOrEmptyString($this->sStyleClass); } /** @@ -134,7 +134,7 @@ class ormStyle */ public function SetStyleClass(?string $sStyleClass) { - $this->sStyleClass = (utils::StrLen($sStyleClass) === 0) ? null : $sStyleClass; + $this->sStyleClass = utils::IsNullOrEmptyString($sStyleClass) ? null : $sStyleClass; return $this; } @@ -144,7 +144,7 @@ class ormStyle */ public function HasAltStyleClass(): bool { - return utils::StrLen($this->sAltStyleClass) > 0; + return utils::IsNotNullOrEmptyString($this->sAltStyleClass); } /** @@ -162,7 +162,7 @@ class ormStyle */ public function SetAltStyleClass(?string $sAltStyleClass) { - $this->sAltStyleClass = (utils::StrLen($sAltStyleClass) === 0) ? null : $sAltStyleClass; + $this->sAltStyleClass = utils::IsNullOrEmptyString($sAltStyleClass) ? null : $sAltStyleClass; return $this; } @@ -172,7 +172,7 @@ class ormStyle */ public function HasDecorationClasses(): bool { - return utils::StrLen($this->sDecorationClasses) > 0; + return utils::IsNotNullOrEmptyString($this->sDecorationClasses); } /** @@ -190,7 +190,7 @@ class ormStyle */ public function SetDecorationClasses(?string $sDecorationClasses) { - $this->sDecorationClasses = (utils::StrLen($sDecorationClasses) === 0) ? null : $sDecorationClasses; + $this->sDecorationClasses = utils::IsNullOrEmptyString($sDecorationClasses) ? null : $sDecorationClasses; return $this; } @@ -200,7 +200,7 @@ class ormStyle */ public function HasIcon(): bool { - return utils::StrLen($this->sIcon) > 0; + return utils::IsNotNullOrEmptyString($this->sIcon); } /** @@ -210,7 +210,7 @@ class ormStyle */ public function SetIcon(?string $sIcon) { - $this->sIcon = (utils::StrLen($sIcon) === 0) ? null : $sIcon; + $this->sIcon = utils::IsNullOrEmptyString($sIcon) ? null : $sIcon; return $this; } diff --git a/sources/application/UI/Base/Component/Button/ButtonUIBlockFactory.php b/sources/application/UI/Base/Component/Button/ButtonUIBlockFactory.php index fa03c643d..0b9d5b875 100644 --- a/sources/application/UI/Base/Component/Button/ButtonUIBlockFactory.php +++ b/sources/application/UI/Base/Component/Button/ButtonUIBlockFactory.php @@ -424,11 +424,11 @@ class ButtonUIBlockFactory extends AbstractUIBlockFactory $oButton->SetActionType($sActionType) ->SetColor($sColor); - if (utils::StrLen($sValue) > 0) { + if (utils::IsNotNullOrEmptyString($sValue)) { $oButton->SetValue($sValue); } - if (utils::StrLen($sName) > 0) { + if (utils::IsNotNullOrEmptyString($sName)) { $oButton->SetName($sName); } diff --git a/sources/application/UI/Base/Component/Input/InputWithLabel.php b/sources/application/UI/Base/Component/Input/InputWithLabel.php index b7ce8f4d9..09931a4f6 100644 --- a/sources/application/UI/Base/Component/Input/InputWithLabel.php +++ b/sources/application/UI/Base/Component/Input/InputWithLabel.php @@ -135,7 +135,7 @@ class InputWithLabel extends UIBlock */ public function HasDescription(): bool { - return utils::StrLen($this->sDescription) > 0; + return utils::IsNotNullOrEmptyString($this->sDescription); } } \ No newline at end of file From f8648e2929379dd08edac45a5ae1ae0afe259467 Mon Sep 17 00:00:00 2001 From: Eric Espie Date: Fri, 8 Jul 2022 10:59:21 +0200 Subject: [PATCH 21/33] =?UTF-8?q?N=C2=B05267=20-=20Error=20on=20class=20vi?= =?UTF-8?q?ew=20when=20datamodel=20encoding=20is=20not=20UTF-8=20-=20add?= =?UTF-8?q?=20logs=20to=20ease=20finding=20the=20model=20load=20errors?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/designdocument.class.inc.php | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/core/designdocument.class.inc.php b/core/designdocument.class.inc.php index a9448859d..24a50a78f 100644 --- a/core/designdocument.class.inc.php +++ b/core/designdocument.class.inc.php @@ -26,8 +26,10 @@ namespace Combodo\iTop; -use \DOMDocument; -use \DOMFormatException; +use DOMDocument; +use DOMFormatException; +use IssueLog; +use LogAPI; /** * Class \Combodo\iTop\DesignDocument @@ -64,9 +66,13 @@ class DesignDocument extends DOMDocument * @param $filename * @param int $options */ - public function load($filename, $options = 0) + public function load($filename, $options = null) { - parent::load($filename, LIBXML_NOBLANKS); + libxml_clear_errors(); + if (parent::load($filename, LIBXML_NOBLANKS) === false) { + $aErrors = libxml_get_errors(); + IssueLog::Error("Error loading $filename", LogAPI::CHANNEL_DEFAULT, $aErrors); + } } /** @@ -77,10 +83,10 @@ class DesignDocument extends DOMDocument * * @return int */ - public function save($filename, $options = 0) + public function save($filename, $options = null) { $this->documentElement->setAttribute('xmlns:xsi', "http://www.w3.org/2001/XMLSchema-instance"); - return parent::save($filename, LIBXML_NOBLANKS); + return parent::save($filename); } /** From a3de9fa898770b7a7fe36a86890274aac3c2e301 Mon Sep 17 00:00:00 2001 From: Vincent Dumas <42336698+v-dumas@users.noreply.github.com> Date: Fri, 8 Jul 2022 12:06:47 +0200 Subject: [PATCH 22/33] =?UTF-8?q?N=C2=B05102=20-=20OAuth=20client=20-=20Ad?= =?UTF-8?q?d=20EN=20tooltips?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../en.dict.itop-oauth-client.php | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) 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 c93f56053..b7dab8068 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 @@ -37,17 +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: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', @@ -57,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+' => '', ]); @@ -70,13 +70,13 @@ 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+' => '', + '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+' => '', + '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', @@ -84,7 +84,7 @@ Dict::Add('EN US', 'English', 'English', array( '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+' => '', + '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', )); @@ -97,13 +97,13 @@ 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+' => '', + '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+' => '', + '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', @@ -111,7 +111,7 @@ Dict::Add('EN US', 'English', 'English', array( '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+' => '', + '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', )); From e900a44d47717f9f47a7584ea4f6f076efb9a69e Mon Sep 17 00:00:00 2001 From: Vincent Dumas <42336698+v-dumas@users.noreply.github.com> Date: Fri, 8 Jul 2022 12:22:52 +0200 Subject: [PATCH 23/33] =?UTF-8?q?N=C2=B05102=20-=20OAuth=20client=20-=20FR?= =?UTF-8?q?=20tooltips?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr.dict.itop-oauth-client.php | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) 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 c023795f1..5f6c286f4 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 @@ -37,17 +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:name+' => 'L\'adresse email à utiliser chez ce fournisseur', 'Class:OAuthClient/Attribute:status' => 'Statut', - 'Class:OAuthClient/Attribute:status+' => '', + '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', @@ -57,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+' => '', ]); @@ -70,13 +70,13 @@ 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+' => '', + '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+' => '', + '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', @@ -84,7 +84,7 @@ Dict::Add('FR FR', 'French', 'Français', array( '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+' => '', + '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', )); @@ -97,20 +97,20 @@ Dict::Add('FR FR', 'French', 'Français', array( 'Class:OAuthClientGoogle' => 'Client OAuth pour Google', 'Class:OAuthClientGoogle/Name' => '%1$s (%2$s)', 'Class:OAuthClientGoogle/Attribute:scope' => 'Niveaux d\'accès', - 'Class:OAuthClientGoogle/Attribute:scope+' => '', + '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+' => '', + '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+' => '', + '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', )); From 0b1caac195ad7995714e5c417252a06d5a42ff54 Mon Sep 17 00:00:00 2001 From: Molkobain Date: Fri, 8 Jul 2022 13:21:51 +0200 Subject: [PATCH 24/33] =?UTF-8?q?N=C2=B04867=20-=20Restore=20datamodel=20n?= =?UTF-8?q?ode=20to=20avoid=20minor=20version=20migration=20crash?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Will be properly removed in 3.1.0 --- datamodels/2.x/itop-tickets/datamodel.itop-tickets.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/datamodels/2.x/itop-tickets/datamodel.itop-tickets.xml b/datamodels/2.x/itop-tickets/datamodel.itop-tickets.xml index 9fba41021..9f2c0b0f4 100755 --- a/datamodels/2.x/itop-tickets/datamodel.itop-tickets.xml +++ b/datamodels/2.x/itop-tickets/datamodel.itop-tickets.xml @@ -1733,6 +1733,7 @@ 500 + true From eef00502cdf29766cf2d31741806019d6d05ee8d Mon Sep 17 00:00:00 2001 From: Vincent Dumas <42336698+v-dumas@users.noreply.github.com> Date: Fri, 8 Jul 2022 13:38:37 +0200 Subject: [PATCH 25/33] =?UTF-8?q?N=C2=B05102=20-=20OAuth=20-=20remove=20un?= =?UTF-8?q?supported=20quote=20FR?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../2.x/itop-oauth-client/fr.dict.itop-oauth-client.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 5f6c286f4..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 @@ -39,7 +39,7 @@ Dict::Add('FR FR', 'French', 'Français', [ 'Class:OAuthClient/Attribute:name' => 'Login', '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+' => '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', @@ -84,7 +84,7 @@ Dict::Add('FR FR', 'French', 'Français', array( '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+' => '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', )); @@ -110,7 +110,7 @@ Dict::Add('FR FR', 'French', 'Français', array( '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+' => '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', )); From f19d1472c578cf73cc036afdb673a5a3984ed38a Mon Sep 17 00:00:00 2001 From: Vincent Dumas <42336698+v-dumas@users.noreply.github.com> Date: Fri, 8 Jul 2022 13:44:00 +0200 Subject: [PATCH 26/33] =?UTF-8?q?N=C2=B05102=20-=20OAuth=20-=20replace=20d?= =?UTF-8?q?ouble=20quote=20char=20EN?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use a special double quote characters so it is correctly handled in HTML --- .../2.x/itop-oauth-client/en.dict.itop-oauth-client.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 b7dab8068..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 @@ -39,7 +39,7 @@ Dict::Add('EN US', 'English', 'English', [ 'Class:OAuthClient/Attribute:name' => 'Login', 'Class:OAuthClient/Attribute:name+' => 'In general, this is your email address', 'Class:OAuthClient/Attribute:status' => '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+' => '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', @@ -76,7 +76,7 @@ Dict::Add('EN US', 'English', 'English', array( '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: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', @@ -103,7 +103,7 @@ Dict::Add('EN US', 'English', 'English', array( '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: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', From 53c50cf6fc55616cfbfb1ed65b61f82d8ac8d757 Mon Sep 17 00:00:00 2001 From: Benjamin Dalsass Date: Mon, 11 Jul 2022 08:20:22 +0200 Subject: [PATCH 27/33] Update community licence 2.7.7 --- setup/licenses/community-licenses.xml | 1543 ------------------------- 1 file changed, 1543 deletions(-) diff --git a/setup/licenses/community-licenses.xml b/setup/licenses/community-licenses.xml index 5d6f0c473..64d91c5eb 100644 --- a/setup/licenses/community-licenses.xml +++ b/setup/licenses/community-licenses.xml @@ -1703,214 +1703,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 @@ -2720,1339 +2512,4 @@ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ]]> - - combodo/tcpdf - Nicola Asuni - Combodo - LGPL-3.0-only - - - - doctrine/lexer - Guilherme Blanco - Roman Borschel - Johannes Schmitt - MIT - - - - egulias/email-validator - Eduardo Gulias Davis - MIT - - - - nikic/php-parser - Nikita Popov - BSD-3-Clause - - - - paragonie/random_compat - Paragon Initiative Enterprises - MIT - - - - pear/archive_tar - Vincent Blavet - Greg Beaver - Michiel Rook - BSD-3-Clause - - - - pear/console_getopt - Andrei Zmievski - Stig Bakken - Greg Beaver - BSD-2-Clause - - - - pear/pear-core-minimal - Christian Weiske - BSD-3-Clause - - - - pear/pear_exception - Helgi Thormar - Greg Beaver - BSD-2-Clause - , - Gregory Beaver , - Helgi Þormar Þorbjörnsson , - Tomas V.V.Cox , - Martin Jansen . -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - ]]> - - - pelago/emogrifier - Oliver Klee - Zoli Szabó - John Reeve - Jake Hotson - Cameron Brooks - Jaime Prado - MIT - - - - psr/cache - PHP-FIG - MIT - - - - psr/container - PHP-FIG - MIT - - - - psr/log - PHP-FIG - MIT - - - - psr/simple-cache - PHP-FIG - MIT - Permission is hereby granted, free of charge, to any person obtaining a copy -> of this software and associated documentation files (the "Software"), to deal -> in the Software without restriction, including without limitation the rights -> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -> copies of the Software, and to permit persons to whom the Software is -> furnished to do so, subject to the following conditions: -> -> The above copyright notice and this permission notice shall be included in -> all copies or substantial portions of the Software. -> -> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -> THE SOFTWARE. - ]]> - - - scssphp/scssphp - Anthon Pang - Cédric Morin - MIT - - - - swiftmailer/swiftmailer - Chris Corbyn - Fabien Potencier - MIT - - - - symfony/cache - Nicolas Grekas - Symfony Community - MIT - - - - symfony/class-loader - Fabien Potencier - Symfony Community - MIT - - - - symfony/config - Fabien Potencier - Symfony Community - MIT - - - - symfony/console - Fabien Potencier - Symfony Community - MIT - - - - symfony/css-selector - Fabien Potencier - Jean-François Simon - Symfony Community - MIT - - - - symfony/debug - Fabien Potencier - Symfony Community - MIT - - - - symfony/dependency-injection - Fabien Potencier - Symfony Community - MIT - - - - symfony/dotenv - Fabien Potencier - Symfony Community - MIT - - - - symfony/event-dispatcher - Fabien Potencier - Symfony Community - MIT - - - - symfony/filesystem - Fabien Potencier - Symfony Community - MIT - - - - symfony/finder - Fabien Potencier - Symfony Community - MIT - - - - symfony/framework-bundle - Fabien Potencier - Symfony Community - MIT - - - - symfony/http-foundation - Fabien Potencier - Symfony Community - MIT - - - - symfony/http-kernel - Fabien Potencier - Symfony Community - MIT - - - - symfony/polyfill-apcu - Nicolas Grekas - Symfony Community - MIT - - - - symfony/polyfill-ctype - Gert de Pagter - Symfony Community - MIT - - - - symfony/polyfill-iconv - Nicolas Grekas - Symfony Community - MIT - - - - symfony/polyfill-intl-idn - Laurent Bassin - Trevor Rowbotham - Symfony Community - MIT - - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - ]]> - - - symfony/polyfill-intl-normalizer - Nicolas Grekas - Symfony Community - MIT - - - - symfony/polyfill-mbstring - Nicolas Grekas - Symfony Community - MIT - - - - symfony/polyfill-php56 - Nicolas Grekas - Symfony Community - MIT - - - - symfony/polyfill-php70 - Nicolas Grekas - Symfony Community - MIT - - - - symfony/polyfill-php72 - Nicolas Grekas - Symfony Community - MIT - - - - symfony/polyfill-util - Nicolas Grekas - Symfony Community - MIT - - - - symfony/routing - Fabien Potencier - Symfony Community - MIT - - - - symfony/stopwatch - Fabien Potencier - Symfony Community - MIT - - - - symfony/twig-bridge - Fabien Potencier - Symfony Community - MIT - - - - symfony/twig-bundle - Fabien Potencier - Symfony Community - MIT - - - - symfony/var-dumper - Nicolas Grekas - Symfony Community - MIT - - - - symfony/web-profiler-bundle - Fabien Potencier - Symfony Community - MIT - - - - symfony/yaml - Fabien Potencier - Symfony Community - MIT - - - - twig/twig - Fabien Potencier - Twig Team - Armin Ronacher - BSD-3-Clause - - From e4343ded01403f5b8b0499190ab60b004175bb19 Mon Sep 17 00:00:00 2001 From: Eric Espie Date: Mon, 11 Jul 2022 09:24:24 +0200 Subject: [PATCH 28/33] autoloader updated --- lib/composer/autoload_real.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/composer/autoload_real.php b/lib/composer/autoload_real.php index 661cd2543..bc3e8fca0 100644 --- a/lib/composer/autoload_real.php +++ b/lib/composer/autoload_real.php @@ -2,7 +2,7 @@ // autoload_real.php @generated by Composer -class ComposerAutoloaderInit0018331147de7601e7552f7da8e3bb8b +class ComposerAutoloaderInit5e7efdfe4e8f9526eb41991410b96239 { private static $loader; @@ -24,9 +24,9 @@ class ComposerAutoloaderInit0018331147de7601e7552f7da8e3bb8b require __DIR__ . '/platform_check.php'; - spl_autoload_register(array('ComposerAutoloaderInit0018331147de7601e7552f7da8e3bb8b', 'loadClassLoader'), true, true); + spl_autoload_register(array('ComposerAutoloaderInit5e7efdfe4e8f9526eb41991410b96239', 'loadClassLoader'), true, true); self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__))); - spl_autoload_unregister(array('ComposerAutoloaderInit0018331147de7601e7552f7da8e3bb8b', 'loadClassLoader')); + spl_autoload_unregister(array('ComposerAutoloaderInit5e7efdfe4e8f9526eb41991410b96239', 'loadClassLoader')); $includePaths = require __DIR__ . '/include_paths.php'; $includePaths[] = get_include_path(); @@ -36,7 +36,7 @@ class ComposerAutoloaderInit0018331147de7601e7552f7da8e3bb8b if ($useStaticLoader) { require __DIR__ . '/autoload_static.php'; - call_user_func(\Composer\Autoload\ComposerStaticInit0018331147de7601e7552f7da8e3bb8b::getInitializer($loader)); + call_user_func(\Composer\Autoload\ComposerStaticInit5e7efdfe4e8f9526eb41991410b96239::getInitializer($loader)); } else { $classMap = require __DIR__ . '/autoload_classmap.php'; if ($classMap) { @@ -48,19 +48,19 @@ class ComposerAutoloaderInit0018331147de7601e7552f7da8e3bb8b $loader->register(true); if ($useStaticLoader) { - $includeFiles = Composer\Autoload\ComposerStaticInit0018331147de7601e7552f7da8e3bb8b::$files; + $includeFiles = Composer\Autoload\ComposerStaticInit5e7efdfe4e8f9526eb41991410b96239::$files; } else { $includeFiles = require __DIR__ . '/autoload_files.php'; } foreach ($includeFiles as $fileIdentifier => $file) { - composerRequire0018331147de7601e7552f7da8e3bb8b($fileIdentifier, $file); + composerRequire5e7efdfe4e8f9526eb41991410b96239($fileIdentifier, $file); } return $loader; } } -function composerRequire0018331147de7601e7552f7da8e3bb8b($fileIdentifier, $file) +function composerRequire5e7efdfe4e8f9526eb41991410b96239($fileIdentifier, $file) { if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { require $file; From 13533a2fa9567fd50fe8bbe0e3353a8424f33db1 Mon Sep 17 00:00:00 2001 From: Eric Espie Date: Mon, 11 Jul 2022 14:18:20 +0200 Subject: [PATCH 29/33] :arrow_up: libs upgrade --- lib/thenetworg/oauth2-azure/.gitignore | 4 + lib/thenetworg/oauth2-azure/README.md | 2 +- lib/thenetworg/oauth2-azure/composer.json | 6 +- .../oauth2-azure/src/Provider/Azure.php | 82 +++++++++++++++---- .../oauth2-azure/src/Token/AccessToken.php | 21 +++++ 5 files changed, 97 insertions(+), 18 deletions(-) diff --git a/lib/thenetworg/oauth2-azure/.gitignore b/lib/thenetworg/oauth2-azure/.gitignore index 9c9c8f271..57a23bd06 100644 --- a/lib/thenetworg/oauth2-azure/.gitignore +++ b/lib/thenetworg/oauth2-azure/.gitignore @@ -3,3 +3,7 @@ composer.phar composer.lock .DS_Store + +# IDE +/.idea +/.vscode diff --git a/lib/thenetworg/oauth2-azure/README.md b/lib/thenetworg/oauth2-azure/README.md index fbf296595..ee6f06d3f 100644 --- a/lib/thenetworg/oauth2-azure/README.md +++ b/lib/thenetworg/oauth2-azure/README.md @@ -46,7 +46,7 @@ $provider = new TheNetworg\OAuth2\Client\Provider\Azure([ 'clientSecret' => '{azure-client-secret}', 'redirectUri' => 'https://example.com/callback-url', //Optional - 'scopes' => 'openid', + 'scopes' => ['openid'], //Optional 'defaultEndPointVersion' => '2.0' ]); diff --git a/lib/thenetworg/oauth2-azure/composer.json b/lib/thenetworg/oauth2-azure/composer.json index e2e3b922d..4fb348463 100644 --- a/lib/thenetworg/oauth2-azure/composer.json +++ b/lib/thenetworg/oauth2-azure/composer.json @@ -22,9 +22,11 @@ "sso" ], "require": { - "php": "^5.6|^7.0|^8.0", + "ext-json": "*", + "ext-openssl": "*", + "php": "^7.1|^8.0", "league/oauth2-client": "~2.0", - "firebase/php-jwt": "~3.0||~4.0||~5.0" + "firebase/php-jwt": "~3.0||~4.0||~5.0||~6.0" }, "autoload": { "psr-4": { diff --git a/lib/thenetworg/oauth2-azure/src/Provider/Azure.php b/lib/thenetworg/oauth2-azure/src/Provider/Azure.php index d07fdef34..50aec8235 100644 --- a/lib/thenetworg/oauth2-azure/src/Provider/Azure.php +++ b/lib/thenetworg/oauth2-azure/src/Provider/Azure.php @@ -3,9 +3,13 @@ namespace TheNetworg\OAuth2\Client\Provider; use Firebase\JWT\JWT; +use Firebase\JWT\JWK; +use Firebase\JWT\Key; use League\OAuth2\Client\Grant\AbstractGrant; use League\OAuth2\Client\Provider\AbstractProvider; use League\OAuth2\Client\Provider\Exception\IdentityProviderException; +use League\OAuth2\Client\Provider\ResourceOwnerInterface; +use League\OAuth2\Client\Token\AccessTokenInterface; use League\OAuth2\Client\Tool\BearerAuthorizationTrait; use Psr\Http\Message\ResponseInterface; use TheNetworg\OAuth2\Client\Grant\JwtBearer; @@ -66,7 +70,8 @@ class Azure extends AbstractProvider } if (!array_key_exists($version, $this->openIdConfiguration[$tenant])) { $versionInfix = $this->getVersionUriInfix($version); - $openIdConfigurationUri = 'https://login.microsoftonline.com/' . $tenant . $versionInfix . '/.well-known/openid-configuration'; + $openIdConfigurationUri = $this->urlLogin . $tenant . $versionInfix . '/.well-known/openid-configuration?appid=' . $this->clientId; + $factory = $this->getRequestFactory(); $request = $factory->getRequestWithOptions( 'get', @@ -80,19 +85,28 @@ class Azure extends AbstractProvider return $this->openIdConfiguration[$tenant][$version]; } - public function getBaseAuthorizationUrl() + /** + * @inheritdoc + */ + public function getBaseAuthorizationUrl(): string { $openIdConfiguration = $this->getOpenIdConfiguration($this->tenant, $this->defaultEndPointVersion); return $openIdConfiguration['authorization_endpoint']; } - public function getBaseAccessTokenUrl(array $params) + /** + * @inheritdoc + */ + public function getBaseAccessTokenUrl(array $params): string { $openIdConfiguration = $this->getOpenIdConfiguration($this->tenant, $this->defaultEndPointVersion); return $openIdConfiguration['token_endpoint']; } - public function getAccessToken($grant, array $options = []) + /** + * @inheritdoc + */ + public function getAccessToken($grant, array $options = []): AccessTokenInterface { if ($this->defaultEndPointVersion != self::ENDPOINT_VERSION_2_0) { // Version 2.0 does not support the resources parameter @@ -106,14 +120,21 @@ class Azure extends AbstractProvider return parent::getAccessToken($grant, $options); } - public function getResourceOwner(\League\OAuth2\Client\Token\AccessToken $token) + /** + * @inheritdoc + */ + public function getResourceOwner(\League\OAuth2\Client\Token\AccessToken $token): ResourceOwnerInterface { $data = $token->getIdTokenClaims(); return $this->createResourceOwner($data, $token); } - public function getResourceOwnerDetailsUrl(\League\OAuth2\Client\Token\AccessToken $token) + /** + * @inheritdoc + */ + public function getResourceOwnerDetailsUrl(\League\OAuth2\Client\Token\AccessToken $token): string { + return ''; // shouldn't that return such a URL? } public function getObjects($tenant, $ref, &$accessToken, $headers = []) @@ -164,11 +185,11 @@ class Azure extends AbstractProvider return 'https://' . $openIdConfiguration['msgraph_host']; } - public function get($ref, &$accessToken, $headers = []) + public function get($ref, &$accessToken, $headers = [], $doNotWrap = false) { $response = $this->request('get', $ref, $accessToken, ['headers' => $headers]); - return $this->wrapResponse($response); + return $doNotWrap ? $response : $this->wrapResponse($response); } public function post($ref, $body, &$accessToken, $headers = []) @@ -352,8 +373,24 @@ class Azure extends AbstractProvider $publicKey = $pkey_array ['key']; - $keys[$keyinfo['kid']] = $publicKey; + $keys[$keyinfo['kid']] = new Key($publicKey, 'RS256'); } + } else if (isset($keyinfo['n']) && isset($keyinfo['e'])) { + $pkey_object = JWK::parseKey($keyinfo); + + if ($pkey_object === false) { + throw new \RuntimeException('An attempt to read a public key from a ' . $keyinfo['n'] . ' certificate failed.'); + } + + $pkey_array = openssl_pkey_get_details($pkey_object); + + if ($pkey_array === false) { + throw new \RuntimeException('An attempt to get a public key as an array from a ' . $keyinfo['n'] . ' certificate failed.'); + } + + $publicKey = $pkey_array ['key']; + + $keys[$keyinfo['kid']] = new Key($publicKey, 'RS256');; } } @@ -382,7 +419,10 @@ class Azure extends AbstractProvider return $this->getOpenIdConfiguration($this->tenant, $this->defaultEndPointVersion); } - protected function checkResponse(ResponseInterface $response, $data) + /** + * @inheritdoc + */ + protected function checkResponse(ResponseInterface $response, $data): void { if (isset($data['odata.error']) || isset($data['error'])) { if (isset($data['odata.error']['message']['value'])) { @@ -402,27 +442,39 @@ class Azure extends AbstractProvider throw new IdentityProviderException( $message, $response->getStatusCode(), - $response + $response->getBody() ); } } - protected function getDefaultScopes() + /** + * @inheritdoc + */ + protected function getDefaultScopes(): array { return $this->scope; } - protected function getScopeSeparator() + /** + * @inheritdoc + */ + protected function getScopeSeparator(): string { return $this->scopeSeparator; } - protected function createAccessToken(array $response, AbstractGrant $grant) + /** + * @inheritdoc + */ + protected function createAccessToken(array $response, AbstractGrant $grant): AccessToken { return new AccessToken($response, $this); } - protected function createResourceOwner(array $response, \League\OAuth2\Client\Token\AccessToken $token) + /** + * @inheritdoc + */ + protected function createResourceOwner(array $response, \League\OAuth2\Client\Token\AccessToken $token): AzureResourceOwner { return new AzureResourceOwner($response); } diff --git a/lib/thenetworg/oauth2-azure/src/Token/AccessToken.php b/lib/thenetworg/oauth2-azure/src/Token/AccessToken.php index 3899f8377..7de80f9e5 100644 --- a/lib/thenetworg/oauth2-azure/src/Token/AccessToken.php +++ b/lib/thenetworg/oauth2-azure/src/Token/AccessToken.php @@ -19,6 +19,8 @@ class AccessToken extends \League\OAuth2\Client\Token\AccessToken if (!empty($options['id_token'])) { $this->idToken = $options['id_token']; + unset($this->values['id_token']); + $keys = $provider->getJwtVerificationKeys(); $idTokenClaims = null; try { @@ -45,8 +47,27 @@ class AccessToken extends \League\OAuth2\Client\Token\AccessToken } } + public function getIdToken() + { + return $this->idToken; + } + public function getIdTokenClaims() { return $this->idTokenClaims; } + + /** + * @inheritdoc + */ + public function jsonSerialize() + { + $parameters = parent::jsonSerialize(); + + if ($this->idToken) { + $parameters['id_token'] = $this->idToken; + } + + return $parameters; + } } From 8dbdcdcb256643c7e1c8f5f02c66a965b59d4136 Mon Sep 17 00:00:00 2001 From: Eric Espie Date: Mon, 11 Jul 2022 14:18:44 +0200 Subject: [PATCH 30/33] autoloader updated --- composer.lock | 22 +-- lib/composer/InstalledVersions.php | 25 +-- lib/composer/autoload_classmap.php | 1 + lib/composer/autoload_files.php | 2 +- lib/composer/autoload_static.php | 3 +- lib/composer/installed.json | 245 ++++++++++++++++------------- lib/composer/installed.php | 180 ++++++++++----------- lib/composer/platform_check.php | 2 +- 8 files changed, 249 insertions(+), 231 deletions(-) diff --git a/composer.lock b/composer.lock index 51e4ec5b5..db751f255 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "3438e44ef160404089e3bfa9719f11dd", + "content-hash": "b3cdced77dc5a1160c12aadcafd9d7da", "packages": [ { "name": "combodo/tcpdf", @@ -4337,22 +4337,24 @@ }, { "name": "thenetworg/oauth2-azure", - "version": "v2.0.1", + "version": "v2.1.1", "source": { "type": "git", "url": "https://github.com/TheNetworg/oauth2-azure.git", - "reference": "2649422a0dc74af32d21d9d738d37abcd5b03998" + "reference": "06fb2d620fb6e6c934f632c7ec7c5ea2e978a844" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/TheNetworg/oauth2-azure/zipball/2649422a0dc74af32d21d9d738d37abcd5b03998", - "reference": "2649422a0dc74af32d21d9d738d37abcd5b03998", + "url": "https://api.github.com/repos/TheNetworg/oauth2-azure/zipball/06fb2d620fb6e6c934f632c7ec7c5ea2e978a844", + "reference": "06fb2d620fb6e6c934f632c7ec7c5ea2e978a844", "shasum": "" }, "require": { - "firebase/php-jwt": "~3.0||~4.0||~5.0", + "ext-json": "*", + "ext-openssl": "*", + "firebase/php-jwt": "~3.0||~4.0||~5.0||~6.0", "league/oauth2-client": "~2.0", - "php": "^5.6|^7.0|^8.0" + "php": "^7.1|^8.0" }, "type": "library", "autoload": { @@ -4386,9 +4388,9 @@ ], "support": { "issues": "https://github.com/TheNetworg/oauth2-azure/issues", - "source": "https://github.com/TheNetworg/oauth2-azure/tree/v2.0.1" + "source": "https://github.com/TheNetworg/oauth2-azure/tree/v2.1.1" }, - "time": "2021-01-11T12:20:12+00:00" + "time": "2022-06-23T10:35:36+00:00" }, { "name": "true/punycode", @@ -4753,5 +4755,5 @@ "platform-overrides": { "php": "7.1.3" }, - "plugin-api-version": "2.3.0" + "plugin-api-version": "2.1.0" } diff --git a/lib/composer/InstalledVersions.php b/lib/composer/InstalledVersions.php index c6b54af7b..7c5502ca4 100644 --- a/lib/composer/InstalledVersions.php +++ b/lib/composer/InstalledVersions.php @@ -21,26 +21,11 @@ use Composer\Semver\VersionParser; * See also https://getcomposer.org/doc/07-runtime.md#installed-versions * * To require its presence, you can require `composer-runtime-api ^2.0` - * - * @final */ class InstalledVersions { - /** - * @var mixed[]|null - * @psalm-var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array}|array{}|null - */ private static $installed; - - /** - * @var bool|null - */ private static $canGetVendors; - - /** - * @var array[] - * @psalm-var array}> - */ private static $installedByVendor = array(); /** @@ -243,7 +228,7 @@ class InstalledVersions /** * @return array - * @psalm-return array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool} + * @psalm-return array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string} */ public static function getRootPackage() { @@ -257,7 +242,7 @@ class InstalledVersions * * @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect. * @return array[] - * @psalm-return array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array} + * @psalm-return array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array} */ public static function getRawData() { @@ -280,7 +265,7 @@ class InstalledVersions * Returns the raw data of all installed.php which are currently loaded for custom implementations * * @return array[] - * @psalm-return list}> + * @psalm-return list}> */ public static function getAllRawData() { @@ -303,7 +288,7 @@ class InstalledVersions * @param array[] $data A vendor/composer/installed.php data set * @return void * - * @psalm-param array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array} $data + * @psalm-param array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array} $data */ public static function reload($data) { @@ -313,7 +298,7 @@ class InstalledVersions /** * @return array[] - * @psalm-return list}> + * @psalm-return list}> */ private static function getInstalled() { diff --git a/lib/composer/autoload_classmap.php b/lib/composer/autoload_classmap.php index 3b84be56e..4fe85a689 100644 --- a/lib/composer/autoload_classmap.php +++ b/lib/composer/autoload_classmap.php @@ -967,6 +967,7 @@ return array( 'Laminas\\Validator\\Timezone' => $vendorDir . '/laminas/laminas-validator/src/Timezone.php', 'Laminas\\Validator\\Translator\\TranslatorAwareInterface' => $vendorDir . '/laminas/laminas-validator/src/Translator/TranslatorAwareInterface.php', 'Laminas\\Validator\\Translator\\TranslatorInterface' => $vendorDir . '/laminas/laminas-validator/src/Translator/TranslatorInterface.php', + 'Laminas\\Validator\\UndisclosedPassword' => $vendorDir . '/laminas/laminas-validator/src/UndisclosedPassword.php', 'Laminas\\Validator\\Uri' => $vendorDir . '/laminas/laminas-validator/src/Uri.php', 'Laminas\\Validator\\Uuid' => $vendorDir . '/laminas/laminas-validator/src/Uuid.php', 'Laminas\\Validator\\ValidatorChain' => $vendorDir . '/laminas/laminas-validator/src/ValidatorChain.php', diff --git a/lib/composer/autoload_files.php b/lib/composer/autoload_files.php index 7be757bea..23d0dcebb 100644 --- a/lib/composer/autoload_files.php +++ b/lib/composer/autoload_files.php @@ -14,8 +14,8 @@ return array( '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', + 'e69f7f6ee287b969198c3c9d6777bd38' => $vendorDir . '/symfony/polyfill-intl-normalizer/bootstrap.php', 'f598d06aa772fa33d905e87be6398fb1' => $vendorDir . '/symfony/polyfill-intl-idn/bootstrap.php', '7b11c4dc42b3b3023073cb14e519683c' => $vendorDir . '/ralouphie/getallheaders/src/getallheaders.php', 'c964ee0ededf28c96ebd9db5099ef910' => $vendorDir . '/guzzlehttp/promises/src/functions_include.php', diff --git a/lib/composer/autoload_static.php b/lib/composer/autoload_static.php index 9a6052572..d45d086d6 100644 --- a/lib/composer/autoload_static.php +++ b/lib/composer/autoload_static.php @@ -15,8 +15,8 @@ class ComposerStaticInit5e7efdfe4e8f9526eb41991410b96239 '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', + 'e69f7f6ee287b969198c3c9d6777bd38' => __DIR__ . '/..' . '/symfony/polyfill-intl-normalizer/bootstrap.php', 'f598d06aa772fa33d905e87be6398fb1' => __DIR__ . '/..' . '/symfony/polyfill-intl-idn/bootstrap.php', '7b11c4dc42b3b3023073cb14e519683c' => __DIR__ . '/..' . '/ralouphie/getallheaders/src/getallheaders.php', 'c964ee0ededf28c96ebd9db5099ef910' => __DIR__ . '/..' . '/guzzlehttp/promises/src/functions_include.php', @@ -1335,6 +1335,7 @@ class ComposerStaticInit5e7efdfe4e8f9526eb41991410b96239 'Laminas\\Validator\\Timezone' => __DIR__ . '/..' . '/laminas/laminas-validator/src/Timezone.php', 'Laminas\\Validator\\Translator\\TranslatorAwareInterface' => __DIR__ . '/..' . '/laminas/laminas-validator/src/Translator/TranslatorAwareInterface.php', 'Laminas\\Validator\\Translator\\TranslatorInterface' => __DIR__ . '/..' . '/laminas/laminas-validator/src/Translator/TranslatorInterface.php', + 'Laminas\\Validator\\UndisclosedPassword' => __DIR__ . '/..' . '/laminas/laminas-validator/src/UndisclosedPassword.php', 'Laminas\\Validator\\Uri' => __DIR__ . '/..' . '/laminas/laminas-validator/src/Uri.php', 'Laminas\\Validator\\Uuid' => __DIR__ . '/..' . '/laminas/laminas-validator/src/Uuid.php', 'Laminas\\Validator\\ValidatorChain' => __DIR__ . '/..' . '/laminas/laminas-validator/src/ValidatorChain.php', diff --git a/lib/composer/installed.json b/lib/composer/installed.json index af1054fca..d5888285e 100644 --- a/lib/composer/installed.json +++ b/lib/composer/installed.json @@ -122,32 +122,30 @@ }, { "name": "doctrine/lexer", - "version": "1.0.2", - "version_normalized": "1.0.2.0", + "version": "1.2.3", + "version_normalized": "1.2.3.0", "source": { "type": "git", "url": "https://github.com/doctrine/lexer.git", - "reference": "1febd6c3ef84253d7c815bed85fc622ad207a9f8" + "reference": "c268e882d4dbdd85e36e4ad69e02dc284f89d229" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/lexer/zipball/1febd6c3ef84253d7c815bed85fc622ad207a9f8", - "reference": "1febd6c3ef84253d7c815bed85fc622ad207a9f8", + "url": "https://api.github.com/repos/doctrine/lexer/zipball/c268e882d4dbdd85e36e4ad69e02dc284f89d229", + "reference": "c268e882d4dbdd85e36e4ad69e02dc284f89d229", "shasum": "" }, "require": { - "php": ">=5.3.2" + "php": "^7.1 || ^8.0" }, "require-dev": { - "phpunit/phpunit": "^4.5" + "doctrine/coding-standard": "^9.0", + "phpstan/phpstan": "^1.3", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "vimeo/psalm": "^4.11" }, - "time": "2019-06-08T11:03:04+00:00", + "time": "2022-02-28T11:07:21+00:00", "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, "installation-source": "dist", "autoload": { "psr-4": { @@ -159,14 +157,14 @@ "MIT" ], "authors": [ - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, { "name": "Guilherme Blanco", "email": "guilhermeblanco@gmail.com" }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, { "name": "Johannes Schmitt", "email": "schmittjoh@gmail.com" @@ -183,8 +181,22 @@ ], "support": { "issues": "https://github.com/doctrine/lexer/issues", - "source": "https://github.com/doctrine/lexer/tree/1.0.2" + "source": "https://github.com/doctrine/lexer/tree/1.2.3" }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Flexer", + "type": "tidelift" + } + ], "install-path": "../doctrine/lexer" }, { @@ -698,17 +710,17 @@ }, { "name": "laminas/laminas-mail", - "version": "2.11.1", - "version_normalized": "2.11.1.0", + "version": "2.12.5", + "version_normalized": "2.12.5.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-mail.git", - "reference": "7f674afeb38100b1869ce8e56bf2ec3cba3c679c" + "reference": "ed5b36a0deef4ffafe6138c2ae9cafcffafab856" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-mail/zipball/7f674afeb38100b1869ce8e56bf2ec3cba3c679c", - "reference": "7f674afeb38100b1869ce8e56bf2ec3cba3c679c", + "url": "https://api.github.com/repos/laminas/laminas-mail/zipball/ed5b36a0deef4ffafe6138c2ae9cafcffafab856", + "reference": "ed5b36a0deef4ffafe6138c2ae9cafcffafab856", "shasum": "" }, "require": { @@ -718,7 +730,7 @@ "laminas/laminas-stdlib": "^2.7 || ^3.0", "laminas/laminas-validator": "^2.10.2", "laminas/laminas-zendframework-bridge": "^1.0", - "php": "^5.6 || ^7.0", + "php": "^7.1", "true/punycode": "^2.1" }, "replace": { @@ -728,20 +740,16 @@ "laminas/laminas-coding-standard": "~1.0.0", "laminas/laminas-config": "^2.6", "laminas/laminas-crypt": "^2.6 || ^3.0", - "laminas/laminas-servicemanager": "^2.7.10 || ^3.3.1", - "phpunit/phpunit": "^5.7.25 || ^6.4.4 || ^7.1.4" + "laminas/laminas-servicemanager": "^3.2.1", + "phpunit/phpunit": "^7.5.20" }, "suggest": { "laminas/laminas-crypt": "Crammd5 support in SMTP Auth", "laminas/laminas-servicemanager": "^2.7.10 || ^3.3.1 when using SMTP to deliver messages" }, - "time": "2020-07-28T21:17:48+00:00", + "time": "2020-12-31T11:41:57+00:00", "type": "library", "extra": { - "branch-alias": { - "dev-master": "2.11.x-dev", - "dev-develop": "2.12.x-dev" - }, "laminas": { "component": "Laminas\\Mail", "config-provider": "Laminas\\Mail\\ConfigProvider" @@ -996,27 +1004,27 @@ }, { "name": "laminas/laminas-validator", - "version": "2.12.2", - "version_normalized": "2.12.2.0", + "version": "2.13.5", + "version_normalized": "2.13.5.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-validator.git", - "reference": "0813f234812d9fa9058b6da39eb13dedc90227db" + "reference": "d334dddda43af263d6a7e5024fd2b013cb6981f7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-validator/zipball/0813f234812d9fa9058b6da39eb13dedc90227db", - "reference": "0813f234812d9fa9058b6da39eb13dedc90227db", + "url": "https://api.github.com/repos/laminas/laminas-validator/zipball/d334dddda43af263d6a7e5024fd2b013cb6981f7", + "reference": "d334dddda43af263d6a7e5024fd2b013cb6981f7", "shasum": "" }, "require": { "container-interop/container-interop": "^1.1", "laminas/laminas-stdlib": "^3.2.1", "laminas/laminas-zendframework-bridge": "^1.0", - "php": "^5.6 || ^7.0" + "php": "^7.1" }, "replace": { - "zendframework/zend-validator": "self.version" + "zendframework/zend-validator": "^2.13.0" }, "require-dev": { "laminas/laminas-cache": "^2.6.1", @@ -1030,7 +1038,9 @@ "laminas/laminas-servicemanager": "^2.7.5 || ^3.0.3", "laminas/laminas-session": "^2.8", "laminas/laminas-uri": "^2.5", - "phpunit/phpunit": "^6.0.8 || ^5.7.15", + "phpunit/phpunit": "^7.5.20 || ^8.5.2", + "psr/http-client": "^1.0", + "psr/http-factory": "^1.0", "psr/http-message": "^1.0" }, "suggest": { @@ -1044,13 +1054,9 @@ "laminas/laminas-uri": "Laminas\\Uri component, required by the Uri and Sitemap\\Loc validators", "psr/http-message": "psr/http-message, required when validating PSR-7 UploadedFileInterface instances via the Upload and UploadFile validators" }, - "time": "2019-12-31T17:57:44+00:00", + "time": "2021-01-06T15:05:04+00:00", "type": "library", "extra": { - "branch-alias": { - "dev-master": "2.12.x-dev", - "dev-develop": "2.13.x-dev" - }, "laminas": { "component": "Laminas\\Validator", "config-provider": "Laminas\\Validator\\ConfigProvider" @@ -1080,6 +1086,12 @@ "rss": "https://github.com/laminas/laminas-validator/releases.atom", "source": "https://github.com/laminas/laminas-validator" }, + "funding": [ + { + "url": "https://funding.communitybridge.org/projects/laminas-project", + "type": "community_bridge" + } + ], "install-path": "../laminas/laminas-validator" }, { @@ -1569,26 +1581,26 @@ }, { "name": "pear/pear_exception", - "version": "v1.0.1", - "version_normalized": "1.0.1.0", + "version": "v1.0.2", + "version_normalized": "1.0.2.0", "source": { "type": "git", "url": "https://github.com/pear/PEAR_Exception.git", - "reference": "dbb42a5a0e45f3adcf99babfb2a1ba77b8ac36a7" + "reference": "b14fbe2ddb0b9f94f5b24cf08783d599f776fff0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pear/PEAR_Exception/zipball/dbb42a5a0e45f3adcf99babfb2a1ba77b8ac36a7", - "reference": "dbb42a5a0e45f3adcf99babfb2a1ba77b8ac36a7", + "url": "https://api.github.com/repos/pear/PEAR_Exception/zipball/b14fbe2ddb0b9f94f5b24cf08783d599f776fff0", + "reference": "b14fbe2ddb0b9f94f5b24cf08783d599f776fff0", "shasum": "" }, "require": { - "php": ">=4.4.0" + "php": ">=5.2.0" }, "require-dev": { - "phpunit/phpunit": "*" + "phpunit/phpunit": "<9" }, - "time": "2019-12-10T10:24:42+00:00", + "time": "2021-03-21T15:43:46+00:00", "type": "class", "extra": { "branch-alias": { @@ -1623,6 +1635,10 @@ "keywords": [ "exception" ], + "support": { + "issues": "http://pear.php.net/bugs/search.php?cmd=display&package_name[]=PEAR_Exception", + "source": "https://github.com/pear/PEAR_Exception" + }, "install-path": "../pear/pear_exception" }, { @@ -2013,17 +2029,17 @@ }, { "name": "scssphp/scssphp", - "version": "1.0.6", - "version_normalized": "1.0.6.0", + "version": "v1.10.3", + "version_normalized": "1.10.3.0", "source": { "type": "git", "url": "https://github.com/scssphp/scssphp.git", - "reference": "5b3c9d704950d8f9637f5110c36c281ec47dc13c" + "reference": "0f1e1516ed2412ad43e42a6a319e77624ba1f713" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/scssphp/scssphp/zipball/5b3c9d704950d8f9637f5110c36c281ec47dc13c", - "reference": "5b3c9d704950d8f9637f5110c36c281ec47dc13c", + "url": "https://api.github.com/repos/scssphp/scssphp/zipball/0f1e1516ed2412ad43e42a6a319e77624ba1f713", + "reference": "0f1e1516ed2412ad43e42a6a319e77624ba1f713", "shasum": "" }, "require": { @@ -2032,12 +2048,21 @@ "php": ">=5.6.0" }, "require-dev": { - "phpunit/phpunit": "^5.7 || ^6.5 || ^7.5 || ^8.3", - "squizlabs/php_codesniffer": "~2.5", - "twbs/bootstrap": "~4.3", + "bamarni/composer-bin-plugin": "^1.4", + "phpunit/phpunit": "^5.7 || ^6.5 || ^7.5 || ^8.3 || ^9.4", + "sass/sass-spec": "*", + "squizlabs/php_codesniffer": "~3.5", + "symfony/phpunit-bridge": "^5.1", + "thoughtbot/bourbon": "^7.0", + "twbs/bootstrap": "~5.0", + "twbs/bootstrap4": "4.6.1", "zurb/foundation": "~6.5" }, - "time": "2019-12-12T05:00:52+00:00", + "suggest": { + "ext-iconv": "Can be used as fallback when ext-mbstring is not available", + "ext-mbstring": "For best performance, mbstring should be installed as it is faster than ext-iconv" + }, + "time": "2022-05-16T07:22:18+00:00", "bin": [ "bin/pscss" ], @@ -2075,7 +2100,7 @@ ], "support": { "issues": "https://github.com/scssphp/scssphp/issues", - "source": "https://github.com/scssphp/scssphp/tree/master" + "source": "https://github.com/scssphp/scssphp/tree/v1.10.3" }, "install-path": "../scssphp/scssphp" }, @@ -3453,30 +3478,33 @@ }, { "name": "symfony/polyfill-iconv", - "version": "v1.19.0", - "version_normalized": "1.19.0.0", + "version": "v1.25.0", + "version_normalized": "1.25.0.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-iconv.git", - "reference": "085241787d52fa6f7a774fd034135fef0cfd5496" + "reference": "f1aed619e28cb077fc83fac8c4c0383578356e40" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-iconv/zipball/085241787d52fa6f7a774fd034135fef0cfd5496", - "reference": "085241787d52fa6f7a774fd034135fef0cfd5496", + "url": "https://api.github.com/repos/symfony/polyfill-iconv/zipball/f1aed619e28cb077fc83fac8c4c0383578356e40", + "reference": "f1aed619e28cb077fc83fac8c4c0383578356e40", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.1" + }, + "provide": { + "ext-iconv": "*" }, "suggest": { "ext-iconv": "For best performance" }, - "time": "2020-10-23T09:01:57+00:00", + "time": "2022-01-04T09:04:05+00:00", "type": "library", "extra": { "branch-alias": { - "dev-main": "1.19-dev" + "dev-main": "1.23-dev" }, "thanks": { "name": "symfony/polyfill", @@ -3516,7 +3544,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-iconv/tree/v1.19.0" + "source": "https://github.com/symfony/polyfill-iconv/tree/v1.25.0" }, "funding": [ { @@ -3536,33 +3564,32 @@ }, { "name": "symfony/polyfill-intl-idn", - "version": "v1.19.0", - "version_normalized": "1.19.0.0", + "version": "v1.25.0", + "version_normalized": "1.25.0.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-idn.git", - "reference": "4ad5115c0f5d5172a9fe8147675ec6de266d8826" + "reference": "749045c69efb97c70d25d7463abba812e91f3a44" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/4ad5115c0f5d5172a9fe8147675ec6de266d8826", - "reference": "4ad5115c0f5d5172a9fe8147675ec6de266d8826", + "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/749045c69efb97c70d25d7463abba812e91f3a44", + "reference": "749045c69efb97c70d25d7463abba812e91f3a44", "shasum": "" }, "require": { - "php": ">=5.3.3", + "php": ">=7.1", "symfony/polyfill-intl-normalizer": "^1.10", - "symfony/polyfill-php70": "^1.10", "symfony/polyfill-php72": "^1.10" }, "suggest": { "ext-intl": "For best performance" }, - "time": "2020-10-21T09:57:48+00:00", + "time": "2021-09-14T14:02:44+00:00", "type": "library", "extra": { "branch-alias": { - "dev-main": "1.19-dev" + "dev-main": "1.23-dev" }, "thanks": { "name": "symfony/polyfill", @@ -3607,7 +3634,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.19.0" + "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.25.0" }, "funding": [ { @@ -3627,30 +3654,30 @@ }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.19.0", - "version_normalized": "1.19.0.0", + "version": "v1.25.0", + "version_normalized": "1.25.0.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "8db0ae7936b42feb370840cf24de1a144fb0ef27" + "reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8db0ae7936b42feb370840cf24de1a144fb0ef27", - "reference": "8db0ae7936b42feb370840cf24de1a144fb0ef27", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8590a5f561694770bdcd3f9b5c69dde6945028e8", + "reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.1" }, "suggest": { "ext-intl": "For best performance" }, - "time": "2020-10-23T09:01:57+00:00", + "time": "2021-02-19T12:13:01+00:00", "type": "library", "extra": { "branch-alias": { - "dev-main": "1.19-dev" + "dev-main": "1.23-dev" }, "thanks": { "name": "symfony/polyfill", @@ -3694,7 +3721,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.19.0" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.25.0" }, "funding": [ { @@ -3960,27 +3987,27 @@ }, { "name": "symfony/polyfill-php72", - "version": "v1.19.0", - "version_normalized": "1.19.0.0", + "version": "v1.25.0", + "version_normalized": "1.25.0.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "beecef6b463b06954638f02378f52496cb84bacc" + "reference": "9a142215a36a3888e30d0a9eeea9766764e96976" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/beecef6b463b06954638f02378f52496cb84bacc", - "reference": "beecef6b463b06954638f02378f52496cb84bacc", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/9a142215a36a3888e30d0a9eeea9766764e96976", + "reference": "9a142215a36a3888e30d0a9eeea9766764e96976", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.1" }, - "time": "2020-10-23T09:01:57+00:00", + "time": "2021-05-27T09:17:38+00:00", "type": "library", "extra": { "branch-alias": { - "dev-main": "1.19-dev" + "dev-main": "1.23-dev" }, "thanks": { "name": "symfony/polyfill", @@ -4019,7 +4046,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php72/tree/v1.19.0" + "source": "https://github.com/symfony/polyfill-php72/tree/v1.25.0" }, "funding": [ { @@ -4708,25 +4735,27 @@ }, { "name": "thenetworg/oauth2-azure", - "version": "v2.0.1", - "version_normalized": "2.0.1.0", + "version": "v2.1.1", + "version_normalized": "2.1.1.0", "source": { "type": "git", "url": "https://github.com/TheNetworg/oauth2-azure.git", - "reference": "2649422a0dc74af32d21d9d738d37abcd5b03998" + "reference": "06fb2d620fb6e6c934f632c7ec7c5ea2e978a844" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/TheNetworg/oauth2-azure/zipball/2649422a0dc74af32d21d9d738d37abcd5b03998", - "reference": "2649422a0dc74af32d21d9d738d37abcd5b03998", + "url": "https://api.github.com/repos/TheNetworg/oauth2-azure/zipball/06fb2d620fb6e6c934f632c7ec7c5ea2e978a844", + "reference": "06fb2d620fb6e6c934f632c7ec7c5ea2e978a844", "shasum": "" }, "require": { - "firebase/php-jwt": "~3.0||~4.0||~5.0", + "ext-json": "*", + "ext-openssl": "*", + "firebase/php-jwt": "~3.0||~4.0||~5.0||~6.0", "league/oauth2-client": "~2.0", - "php": "^5.6|^7.0|^8.0" + "php": "^7.1|^8.0" }, - "time": "2021-01-11T12:20:12+00:00", + "time": "2022-06-23T10:35:36+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -4760,7 +4789,7 @@ ], "support": { "issues": "https://github.com/TheNetworg/oauth2-azure/issues", - "source": "https://github.com/TheNetworg/oauth2-azure/tree/v2.0.1" + "source": "https://github.com/TheNetworg/oauth2-azure/tree/v2.1.1" }, "install-path": "../thenetworg/oauth2-azure" }, diff --git a/lib/composer/installed.php b/lib/composer/installed.php index 5ba7d993f..5db6e6438 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' => 'e4343ded01403f5b8b0499190ab60b004175bb19', + 'name' => 'combodo/itop', 'dev' => true, ), 'versions' => array( 'combodo/itop' => array( 'pretty_version' => 'dev-develop', 'version' => 'dev-develop', - 'reference' => 'd388c3fd3d2a11983b61d268b2323a4ff0d0dbcb', 'type' => 'project', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), + 'reference' => 'e4343ded01403f5b8b0499190ab60b004175bb19', '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( @@ -44,210 +44,210 @@ ), ), 'doctrine/lexer' => array( - 'pretty_version' => '1.0.2', - 'version' => '1.0.2.0', - 'reference' => '1febd6c3ef84253d7c815bed85fc622ad207a9f8', + 'pretty_version' => '1.2.3', + 'version' => '1.2.3.0', 'type' => 'library', 'install_path' => __DIR__ . '/../doctrine/lexer', 'aliases' => array(), + 'reference' => 'c268e882d4dbdd85e36e4ad69e02dc284f89d229', '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', + 'pretty_version' => '2.12.5', + 'version' => '2.12.5.0', 'type' => 'library', 'install_path' => __DIR__ . '/../laminas/laminas-mail', 'aliases' => array(), + 'reference' => 'ed5b36a0deef4ffafe6138c2ae9cafcffafab856', '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', + 'pretty_version' => '2.13.5', + 'version' => '2.13.5.0', 'type' => 'library', 'install_path' => __DIR__ . '/../laminas/laminas-validator', 'aliases' => array(), + 'reference' => 'd334dddda43af263d6a7e5024fd2b013cb6981f7', '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', + 'pretty_version' => 'v1.0.2', + 'version' => '1.0.2.0', 'type' => 'class', 'install_path' => __DIR__ . '/../pear/pear_exception', 'aliases' => array(), + 'reference' => 'b14fbe2ddb0b9f94f5b24cf08783d599f776fff0', '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( @@ -333,300 +333,300 @@ ), ), 'scssphp/scssphp' => array( - 'pretty_version' => '1.0.6', - 'version' => '1.0.6.0', - 'reference' => '5b3c9d704950d8f9637f5110c36c281ec47dc13c', + 'pretty_version' => 'v1.10.3', + 'version' => '1.10.3.0', 'type' => 'library', 'install_path' => __DIR__ . '/../scssphp/scssphp', 'aliases' => array(), + 'reference' => '0f1e1516ed2412ad43e42a6a319e77624ba1f713', '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', + 'pretty_version' => 'v1.25.0', + 'version' => '1.25.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-iconv', 'aliases' => array(), + 'reference' => 'f1aed619e28cb077fc83fac8c4c0383578356e40', 'dev_requirement' => false, ), 'symfony/polyfill-intl-idn' => array( - 'pretty_version' => 'v1.19.0', - 'version' => '1.19.0.0', - 'reference' => '4ad5115c0f5d5172a9fe8147675ec6de266d8826', + 'pretty_version' => 'v1.25.0', + 'version' => '1.25.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-intl-idn', 'aliases' => array(), + 'reference' => '749045c69efb97c70d25d7463abba812e91f3a44', 'dev_requirement' => false, ), 'symfony/polyfill-intl-normalizer' => array( - 'pretty_version' => 'v1.19.0', - 'version' => '1.19.0.0', - 'reference' => '8db0ae7936b42feb370840cf24de1a144fb0ef27', + 'pretty_version' => 'v1.25.0', + 'version' => '1.25.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-intl-normalizer', 'aliases' => array(), + 'reference' => '8590a5f561694770bdcd3f9b5c69dde6945028e8', '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', + 'pretty_version' => 'v1.25.0', + 'version' => '1.25.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-php72', 'aliases' => array(), + 'reference' => '9a142215a36a3888e30d0a9eeea9766764e96976', '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( @@ -636,30 +636,30 @@ ), ), 'thenetworg/oauth2-azure' => array( - 'pretty_version' => 'v2.0.1', - 'version' => '2.0.1.0', - 'reference' => '2649422a0dc74af32d21d9d738d37abcd5b03998', + 'pretty_version' => 'v2.1.1', + 'version' => '2.1.1.0', 'type' => 'library', 'install_path' => __DIR__ . '/../thenetworg/oauth2-azure', 'aliases' => array(), + 'reference' => '06fb2d620fb6e6c934f632c7ec7c5ea2e978a844', '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( @@ -695,7 +695,7 @@ 'zendframework/zend-validator' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '2.12.2', + 0 => '^2.13.0', ), ), ), diff --git a/lib/composer/platform_check.php b/lib/composer/platform_check.php index 861c725e0..951cac27d 100644 --- a/lib/composer/platform_check.php +++ b/lib/composer/platform_check.php @@ -12,10 +12,10 @@ $missingExtensions = array(); extension_loaded('ctype') || $missingExtensions[] = 'ctype'; extension_loaded('dom') || $missingExtensions[] = 'dom'; extension_loaded('gd') || $missingExtensions[] = 'gd'; -extension_loaded('iconv') || $missingExtensions[] = 'iconv'; extension_loaded('json') || $missingExtensions[] = 'json'; extension_loaded('libxml') || $missingExtensions[] = 'libxml'; extension_loaded('mysqli') || $missingExtensions[] = 'mysqli'; +extension_loaded('openssl') || $missingExtensions[] = 'openssl'; extension_loaded('soap') || $missingExtensions[] = 'soap'; extension_loaded('tokenizer') || $missingExtensions[] = 'tokenizer'; extension_loaded('xml') || $missingExtensions[] = 'xml'; From badc5ff3ec8d2e67f9f5ba69a125c534b3320289 Mon Sep 17 00:00:00 2001 From: Eric Espie Date: Mon, 11 Jul 2022 15:20:29 +0200 Subject: [PATCH 31/33] Merge remote-tracking branch 'origin/support/2.7' into support/3.0 --- datamodels/2.x/itop-portal/datamodel.itop-portal.xml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/datamodels/2.x/itop-portal/datamodel.itop-portal.xml b/datamodels/2.x/itop-portal/datamodel.itop-portal.xml index 3e74e3e3b..7afb2a5bd 100644 --- a/datamodels/2.x/itop-portal/datamodel.itop-portal.xml +++ b/datamodels/2.x/itop-portal/datamodel.itop-portal.xml @@ -149,10 +149,4 @@ - - - 500 - true - - From 01ee91d003b3c82863e549d162cdb406a8898868 Mon Sep 17 00:00:00 2001 From: Eric Espie Date: Mon, 11 Jul 2022 15:20:47 +0200 Subject: [PATCH 32/33] =?UTF-8?q?N=C2=B05102=20-=20Allow=20to=20send=20ema?= =?UTF-8?q?ils=20(eg.=20notifications)=20using=20GSuite=20SMTP=20and=20OAu?= =?UTF-8?q?th=20=20*=20migration=20to=20iTop=203.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/utils.inc.php | 8 +- .../datamodel.itop-oauth-client.xml | 86 +++++++++++++------ .../src/Service/PopupMenuExtension.php | 2 +- .../templates/CreateMailbox.html.twig | 3 + .../templates/CreateMailbox.ready.js.twig | 4 + 5 files changed, 74 insertions(+), 29 deletions(-) create mode 100644 datamodels/2.x/itop-oauth-client/templates/CreateMailbox.html.twig create mode 100644 datamodels/2.x/itop-oauth-client/templates/CreateMailbox.ready.js.twig diff --git a/application/utils.inc.php b/application/utils.inc.php index a9a4ce10c..720823080 100644 --- a/application/utils.inc.php +++ b/application/utils.inc.php @@ -2862,10 +2862,10 @@ HTML; * * @param string|null $sString * - * @return boolean if string null or empty + * @return bool if string null or empty * @since 3.0.2 N°5302 */ - public static function IsNullOrEmptyString(?string $sString): boolean + public static function IsNullOrEmptyString(?string $sString): bool { return $sString == null || strlen($sString) == 0; } @@ -2877,10 +2877,10 @@ HTML; * * @param string|null $sString * - * @return boolean if string is not null and not empty + * @return bool if string is not null and not empty * @since 3.0.2 N°5302 */ - public static function IsNotNullOrEmptyString(?string $sString): boolean + public static function IsNotNullOrEmptyString(?string $sString): bool { return !static::IsNullOrEmptyString($sString); } 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 d9ebd265b..26d16e293 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 @@ -1,6 +1,5 @@ - cmdbAbstractObject @@ -17,14 +16,15 @@ - - + @@ -121,18 +121,32 @@ Get('status') == 'inactive') { - $oPage->p(''.Dict::S('itop-oauth-client:Message:MissingToken').''); + $sLabel = Dict::S('itop-oauth-client:Message:MissingToken'); + $sTitle = ''; + $aTags['oauth-message'] = ['title' => $sTitle, 'css_classes' => 'ibo-object-details--tag--oauth-message', 'decoration_classes' => 'fas fa-exclamation-triangle', 'label' => $sLabel]; } 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"); + $sLabel = Dict::S('itop-oauth-client:UsedForSMTP')." $sTestLabel"; + $sTitle = ''; + $aTags['oauth-message'] = ['title' => $sTitle, 'css_classes' => 'ibo-object-details--tag--oauth-message', 'decoration_classes' => 'far fa-envelope', 'label' => $sLabel]; } } + foreach ($aTags as $sIconId => $aIconData) { + $sTagTooltipContent = utils::EscapeHtml($aIconData['title']); + $aHeaderBlocks['subtitle'][static::HEADER_BLOCKS_SUBTITLE_TAG_PREFIX.$sIconId] = new Combodo\iTop\Application\UI\Base\Component\Html\Html(<<{$aIconData['label']} + HTML + ); + } + + return $aHeaderBlocks; } ]]> @@ -294,8 +308,6 @@ - - @@ -312,13 +324,20 @@ true + true - SMTP - IMAP + + SMTP + + + IMAP + scope SMTP,IMAP @@ -332,8 +351,12 @@ true - simple - advanced + + simple + + + advanced + used_scope simple @@ -346,8 +369,12 @@ true - yes - no + + yes + + + no + used_for_smtp no @@ -594,8 +621,6 @@ - - @@ -612,13 +637,20 @@ true + true - SMTP - IMAP + + SMTP + + + IMAP + scope SMTP,IMAP @@ -632,8 +664,12 @@ true - simple - advanced + + simple + + + advanced + used_scope simple @@ -646,8 +682,12 @@ true - yes - no + + yes + + + no + used_for_smtp no @@ -899,7 +939,5 @@ - - 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 31189de73..106b0ea83 100644 --- a/datamodels/2.x/itop-oauth-client/src/Service/PopupMenuExtension.php +++ b/datamodels/2.x/itop-oauth-client/src/Service/PopupMenuExtension.php @@ -41,7 +41,7 @@ class PopupMenuExtension implements \iPopupMenuExtension $sId = $oObj->GetKey(); $sAjaxUri = utils::GetAbsoluteUrlModulePage(static::MODULE_CODE, 'ajax.php'); // Add a new menu item that triggers a custom JS function defined in our own javascript file: js/sample.js - $sJSFileUrl = utils::GetAbsoluteUrlModulesRoot().static::MODULE_CODE.'/assets/js/oauth_connect.js'; + $sJSFileUrl = 'env-'.utils::GetCurrentEnvironment().'/'.static::MODULE_CODE.'/assets/js/oauth_connect.js'; $sRedirectUri = OAuthClientProviderFactory::GetRedirectUri(); $aResult[] = new JSPopupMenuItem( $sMenu.' from '.$sObjClass, diff --git a/datamodels/2.x/itop-oauth-client/templates/CreateMailbox.html.twig b/datamodels/2.x/itop-oauth-client/templates/CreateMailbox.html.twig new file mode 100644 index 000000000..578bce7b0 --- /dev/null +++ b/datamodels/2.x/itop-oauth-client/templates/CreateMailbox.html.twig @@ -0,0 +1,3 @@ +{# @copyright Copyright (C) 2010-2022 Combodo SARL #} +{# @license http://opensource.org/licenses/AGPL-3.0 #} + diff --git a/datamodels/2.x/itop-oauth-client/templates/CreateMailbox.ready.js.twig b/datamodels/2.x/itop-oauth-client/templates/CreateMailbox.ready.js.twig new file mode 100644 index 000000000..8b3d10330 --- /dev/null +++ b/datamodels/2.x/itop-oauth-client/templates/CreateMailbox.ready.js.twig @@ -0,0 +1,4 @@ +{# @copyright Copyright (C) 2010-2022 Combodo SARL #} +{# @license http://opensource.org/licenses/AGPL-3.0 #} + +window.location.href = '{{ sURL|raw }}' \ No newline at end of file From 03b56b29413b3dcd454f8b44e60f28ac89ac7e26 Mon Sep 17 00:00:00 2001 From: Eric Espie Date: Mon, 11 Jul 2022 16:26:41 +0200 Subject: [PATCH 33/33] Merge remote-tracking branch 'origin/support/2.7' into support/3.0 : wrong positioning of module_parameters for portal --- datamodels/2.x/itop-portal/datamodel.itop-portal.xml | 6 ++++++ datamodels/2.x/itop-tickets/datamodel.itop-tickets.xml | 6 ------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/datamodels/2.x/itop-portal/datamodel.itop-portal.xml b/datamodels/2.x/itop-portal/datamodel.itop-portal.xml index 7afb2a5bd..3e74e3e3b 100644 --- a/datamodels/2.x/itop-portal/datamodel.itop-portal.xml +++ b/datamodels/2.x/itop-portal/datamodel.itop-portal.xml @@ -149,4 +149,10 @@ + + + 500 + true + + diff --git a/datamodels/2.x/itop-tickets/datamodel.itop-tickets.xml b/datamodels/2.x/itop-tickets/datamodel.itop-tickets.xml index 8370f9fd5..faa3173b6 100755 --- a/datamodels/2.x/itop-tickets/datamodel.itop-tickets.xml +++ b/datamodels/2.x/itop-tickets/datamodel.itop-tickets.xml @@ -1388,10 +1388,4 @@ - - - 500 - true - -