‪TYPO3CMS  10.4
TYPO3\CMS\Core\Tests\Unit\Authentication\BackendUserAuthenticationTest Class Reference
Inheritance diagram for TYPO3\CMS\Core\Tests\Unit\Authentication\BackendUserAuthenticationTest:

Public Member Functions

 logoffCleansFormProtectionIfBackendUserIsLoggedIn ()
 
array getFilePermissionsTakesUserDefaultAndStoragePermissionsIntoAccountIfUserIsNotAdminDataProvider ()
 
 getFilePermissionsTakesUserDefaultPermissionsFromTsConfigIntoAccountIfUserIsNotAdmin (array $userTsConfiguration)
 
array getFilePermissionsFromStorageDataProvider ()
 
 getFilePermissionsFromStorageOverwritesDefaultPermissions (array $defaultPermissions, $storageUid, array $storagePermissions, array $expectedPermissions)
 
 getFilePermissionsFromStorageAlwaysReturnsDefaultPermissionsForAdmins (array $defaultPermissions, $storageUid, array $storagePermissions)
 
array getFilePermissionsTakesUserDefaultPermissionsFromRecordIntoAccountIfUserIsNotAdminDataProvider ()
 
 getFilePermissionsTakesUserDefaultPermissionsFromRecordIntoAccountIfUserIsNotAdmin (string $permissionValue, array $expectedPermissions)
 
 getFilePermissionsGrantsAllPermissionsToAdminUsers ()
 
 jsConfirmationReturnsTrueIfPassedValueEqualsConfiguration ()
 
 jsConfirmationAllowsSettingMultipleBitsInValue ()
 
 jsConfirmationAllowsUnsettingBitsInValue ($jsConfirmation, $typeChangeAllowed, $copyMovePasteAllowed, $deleteAllowed, $feEditAllowed, $otherAllowed)
 
array jsConfirmationsWithUnsetBits ()
 
 jsConfirmationAlwaysReturnsFalseIfNoConfirmationIsSet ()
 
 jsConfirmationReturnsTrueIfConfigurationIsMissing ()
 
array getPagePermissionsClauseWithValidUserDataProvider ()
 
 getPagePermissionsClauseWithValidUser (int $perms, bool $admin, string $groups, string $expected)
 
 checkAuthModeReturnsExpectedValue (string $theValue, string $authMode, bool $expectedResult)
 
 checkAuthModeReturnsExpectedValueDataProvider ()
 

Protected Member Functions

 setUp ()
 
 tearDown ()
 

Protected Attributes

array $defaultFilePermissions
 

Detailed Description

Test case

Definition at line 40 of file BackendUserAuthenticationTest.php.

Member Function Documentation

◆ checkAuthModeReturnsExpectedValue()

TYPO3\CMS\Core\Tests\Unit\Authentication\BackendUserAuthenticationTest::checkAuthModeReturnsExpectedValue ( string  $theValue,
string  $authMode,
bool  $expectedResult 
)
Test:
‪@dataProvider checkAuthModeReturnsExpectedValueDataProvider
Parameters
string$theValue
string$authMode
bool$expectedResult

Definition at line 793 of file BackendUserAuthenticationTest.php.

◆ checkAuthModeReturnsExpectedValueDataProvider()

TYPO3\CMS\Core\Tests\Unit\Authentication\BackendUserAuthenticationTest::checkAuthModeReturnsExpectedValueDataProvider ( )

Definition at line 814 of file BackendUserAuthenticationTest.php.

◆ getFilePermissionsFromStorageAlwaysReturnsDefaultPermissionsForAdmins()

TYPO3\CMS\Core\Tests\Unit\Authentication\BackendUserAuthenticationTest::getFilePermissionsFromStorageAlwaysReturnsDefaultPermissionsForAdmins ( array  $defaultPermissions,
  $storageUid,
array  $storagePermissions 
)
Parameters
array$defaultPermissions
$storageUid
array$storagePermissions
Test:
‪@dataProvider getFilePermissionsFromStorageDataProvider

Definition at line 364 of file BackendUserAuthenticationTest.php.

◆ getFilePermissionsFromStorageDataProvider()

array TYPO3\CMS\Core\Tests\Unit\Authentication\BackendUserAuthenticationTest::getFilePermissionsFromStorageDataProvider ( )
Returns
‪array

Definition at line 218 of file BackendUserAuthenticationTest.php.

◆ getFilePermissionsFromStorageOverwritesDefaultPermissions()

TYPO3\CMS\Core\Tests\Unit\Authentication\BackendUserAuthenticationTest::getFilePermissionsFromStorageOverwritesDefaultPermissions ( array  $defaultPermissions,
  $storageUid,
array  $storagePermissions,
array  $expectedPermissions 
)
Parameters
array$defaultPermissions
int$storageUid
array$storagePermissions
array$expectedPermissions
Test:
‪@dataProvider getFilePermissionsFromStorageDataProvider

Definition at line 322 of file BackendUserAuthenticationTest.php.

◆ getFilePermissionsGrantsAllPermissionsToAdminUsers()

TYPO3\CMS\Core\Tests\Unit\Authentication\BackendUserAuthenticationTest::getFilePermissionsGrantsAllPermissionsToAdminUsers ( )
Test:

Definition at line 539 of file BackendUserAuthenticationTest.php.

◆ getFilePermissionsTakesUserDefaultAndStoragePermissionsIntoAccountIfUserIsNotAdminDataProvider()

array TYPO3\CMS\Core\Tests\Unit\Authentication\BackendUserAuthenticationTest::getFilePermissionsTakesUserDefaultAndStoragePermissionsIntoAccountIfUserIsNotAdminDataProvider ( )
Returns
‪array

Definition at line 126 of file BackendUserAuthenticationTest.php.

◆ getFilePermissionsTakesUserDefaultPermissionsFromRecordIntoAccountIfUserIsNotAdmin()

TYPO3\CMS\Core\Tests\Unit\Authentication\BackendUserAuthenticationTest::getFilePermissionsTakesUserDefaultPermissionsFromRecordIntoAccountIfUserIsNotAdmin ( string  $permissionValue,
array  $expectedPermissions 
)
Test:
Parameters
string$permissionValue
array$expectedPermissions‪@dataProvider getFilePermissionsTakesUserDefaultPermissionsFromRecordIntoAccountIfUserIsNotAdminDataProvider

Definition at line 516 of file BackendUserAuthenticationTest.php.

◆ getFilePermissionsTakesUserDefaultPermissionsFromRecordIntoAccountIfUserIsNotAdminDataProvider()

array TYPO3\CMS\Core\Tests\Unit\Authentication\BackendUserAuthenticationTest::getFilePermissionsTakesUserDefaultPermissionsFromRecordIntoAccountIfUserIsNotAdminDataProvider ( )
Returns
‪array

Definition at line 402 of file BackendUserAuthenticationTest.php.

◆ getFilePermissionsTakesUserDefaultPermissionsFromTsConfigIntoAccountIfUserIsNotAdmin()

TYPO3\CMS\Core\Tests\Unit\Authentication\BackendUserAuthenticationTest::getFilePermissionsTakesUserDefaultPermissionsFromTsConfigIntoAccountIfUserIsNotAdmin ( array  $userTsConfiguration)
Parameters
array$userTsConfiguration
Test:
‪@dataProvider getFilePermissionsTakesUserDefaultAndStoragePermissionsIntoAccountIfUserIsNotAdminDataProvider

Definition at line 180 of file BackendUserAuthenticationTest.php.

◆ getPagePermissionsClauseWithValidUser()

TYPO3\CMS\Core\Tests\Unit\Authentication\BackendUserAuthenticationTest::getPagePermissionsClauseWithValidUser ( int  $perms,
bool  $admin,
string  $groups,
string  $expected 
)
Test:
‪@dataProvider getPagePermissionsClauseWithValidUserDataProvider
Parameters
int$perms
bool$admin
string$groups
string$expected

Definition at line 743 of file BackendUserAuthenticationTest.php.

References $args.

◆ getPagePermissionsClauseWithValidUserDataProvider()

array TYPO3\CMS\Core\Tests\Unit\Authentication\BackendUserAuthenticationTest::getPagePermissionsClauseWithValidUserDataProvider ( )

Data provider to test page permissions constraints returns an array of test conditions:

  • ‪permission bit(s) as integer
  • ‪admin flag
  • ‪groups for user
  • ‪expected SQL fragment
Returns
‪array

Definition at line 702 of file BackendUserAuthenticationTest.php.

◆ jsConfirmationAllowsSettingMultipleBitsInValue()

TYPO3\CMS\Core\Tests\Unit\Authentication\BackendUserAuthenticationTest::jsConfirmationAllowsSettingMultipleBitsInValue ( )

◆ jsConfirmationAllowsUnsettingBitsInValue()

TYPO3\CMS\Core\Tests\Unit\Authentication\BackendUserAuthenticationTest::jsConfirmationAllowsUnsettingBitsInValue (   $jsConfirmation,
  $typeChangeAllowed,
  $copyMovePasteAllowed,
  $deleteAllowed,
  $feEditAllowed,
  $otherAllowed 
)
Test:
‪@dataProvider jsConfirmationsWithUnsetBits
Parameters
int$jsConfirmation
int$typeChangeAllowed
int$copyMovePasteAllowed
int$deleteAllowed
int$feEditAllowed
int$otherAllowed

Definition at line 619 of file BackendUserAuthenticationTest.php.

References TYPO3\CMS\Core\Type\Bitmask\JsConfirmation\COPY_MOVE_PASTE, TYPO3\CMS\Core\Type\Bitmask\JsConfirmation\DELETE, TYPO3\CMS\Core\Type\Bitmask\JsConfirmation\FE_EDIT, TYPO3\CMS\Core\Type\Bitmask\JsConfirmation\OTHER, and TYPO3\CMS\Core\Type\Bitmask\JsConfirmation\TYPE_CHANGE.

◆ jsConfirmationAlwaysReturnsFalseIfNoConfirmationIsSet()

TYPO3\CMS\Core\Tests\Unit\Authentication\BackendUserAuthenticationTest::jsConfirmationAlwaysReturnsFalseIfNoConfirmationIsSet ( )

◆ jsConfirmationReturnsTrueIfConfigurationIsMissing()

TYPO3\CMS\Core\Tests\Unit\Authentication\BackendUserAuthenticationTest::jsConfirmationReturnsTrueIfConfigurationIsMissing ( )

◆ jsConfirmationReturnsTrueIfPassedValueEqualsConfiguration()

TYPO3\CMS\Core\Tests\Unit\Authentication\BackendUserAuthenticationTest::jsConfirmationReturnsTrueIfPassedValueEqualsConfiguration ( )

◆ jsConfirmationsWithUnsetBits()

array TYPO3\CMS\Core\Tests\Unit\Authentication\BackendUserAuthenticationTest::jsConfirmationsWithUnsetBits ( )
Returns
‪array

Definition at line 639 of file BackendUserAuthenticationTest.php.

◆ logoffCleansFormProtectionIfBackendUserIsLoggedIn()

TYPO3\CMS\Core\Tests\Unit\Authentication\BackendUserAuthenticationTest::logoffCleansFormProtectionIfBackendUserIsLoggedIn ( )

◆ setUp()

TYPO3\CMS\Core\Tests\Unit\Authentication\BackendUserAuthenticationTest::setUp ( )
protected

Definition at line 64 of file BackendUserAuthenticationTest.php.

References $GLOBALS.

◆ tearDown()

TYPO3\CMS\Core\Tests\Unit\Authentication\BackendUserAuthenticationTest::tearDown ( )
protected

Member Data Documentation

◆ $defaultFilePermissions

array TYPO3\CMS\Core\Tests\Unit\Authentication\BackendUserAuthenticationTest::$defaultFilePermissions
protected
Initial value:
= array(
'addFile' => false,
'readFile' => false,
'writeFile' => false,
'copyFile' => false,
'moveFile' => false,
'renameFile' => false,
'deleteFile' => false,
'addFolder' => false,
'readFolder' => false,
'writeFolder' => false,
'copyFolder' => false,
'moveFolder' => false,
'renameFolder' => false,
'deleteFolder' => false,
'recursivedeleteFolder' => false
)

Definition at line 44 of file BackendUserAuthenticationTest.php.