[BUGFIX] Fix file permission methods in BackendUserAuthentication 37/23037/6
authorHelmut Hummel <helmut.hummel@typo3.org>
Wed, 7 Aug 2013 16:33:37 +0000 (18:33 +0200)
committerHelmut Hummel <helmut.hummel@typo3.org>
Thu, 15 Aug 2013 09:32:25 +0000 (11:32 +0200)
commit371c7abe5b83db403753f7fdf5e61ef734c3ddc1
tree680add9465dc2fb65e6eecb5d39999e0d55474c6
parenta82a10678574d012b17044b1e45177885d0f2021
[BUGFIX] Fix file permission methods in BackendUserAuthentication

Take default TSConfig file permissions into account:

File permissions configured in User TSConfig,
are not taken into account, because the properties
from the getTSConfig method are returned in a
'properties' key of an array but the top level
array is used. Use getTSConfigProp instead.

Fix the bit wise check for old file permissions:

XOR the value is wrong because it gives the wrong
result if more bits are set. Use AND operation
to properly check if a specific bit is not set.

Check if the user is admin in getFilePermissionsForStorage()

Add tests to confirm the desired behaviour.

Releases: 6.0, 6.1, 6.2
Resolves: #51004
Change-Id: Ia5d6fa1cb47a74306fe5465a0e70c2f2aea2a4b8
Reviewed-on: https://review.typo3.org/23037
Reviewed-by: Anja Leichsenring
Tested-by: Anja Leichsenring
Reviewed-by: Stefan Neufeind
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel
typo3/sysext/core/Classes/Authentication/BackendUserAuthentication.php
typo3/sysext/core/Tests/Unit/Authentication/BackendUserAuthenticationTest.php