Merge remote-tracking branch 'origin/support/2.7' into develop

# Conflicts:
#	core/log.class.inc.php
#	datamodels/2.x/itop-attachments/renderers.itop-attachments.php
#	js/search/search_form_criteria_enum.js
#	lib/composer/autoload_classmap.php
#	lib/composer/autoload_static.php
#	test/core/dictTest.php
This commit is contained in:
Pierre Goiffon
2021-12-08 18:30:20 +01:00
11 changed files with 579 additions and 30 deletions

View File

@@ -178,5 +178,13 @@ class privUITransactionFileTest extends ItopDataTestCase
$this->assertTrue($bUser1Login2, 'Login with user1 throw an error');
$bResult = privUITransactionFile::RemoveTransaction($sTransactionIdUserSupport);
$this->assertTrue($bResult, 'Token created by support user must be removed in the support user context');
// test when no user logged (combodo-unauthenticated-form module for example)
UserRights::_ResetSessionCache();
$sTransactionIdUnauthenticatedUser = privUITransactionFile::GetNewTransactionId();
$bResult = privUITransactionFile::IsTransactionValid($sTransactionIdUnauthenticatedUser, false);
$this->assertTrue($bResult, 'Token created by unauthenticated user must be valid when no user logged');
$bResult = privUITransactionFile::RemoveTransaction($sTransactionIdUnauthenticatedUser);
$this->assertTrue($bResult, 'Token created by unauthenticated user must be removed when no user logged');
}
}