[TASK] Use JsConfirmation enumeration in BackendUserAuthentication 30/43330/7
authorAndreas Wolf <andreas.wolf@typo3.org>
Sat, 5 Mar 2016 11:56:30 +0000 (12:56 +0100)
committerBenni Mack <benni@typo3.org>
Sun, 6 Mar 2016 00:47:41 +0000 (01:47 +0100)
commit8a79bfa54f8d0e2f3518d05e44ebad16af507b71
treec38d5a0f020f84f0a0bfc276143dc24a15fbc604
parent0b7eb76c45e405fa1abdc49380e6dedf066c4a6f
[TASK] Use JsConfirmation enumeration in BackendUserAuthentication

This makes use of the JsConfirmation enumeration to ensure valid values
in BackendUserAuthentication::jsConfirmation.

As combinations of values are allowed, we need to check for all possible
combinations by comparing to an OR-ed bitmask with all possible bits.
Additionally, this fixes a bug where setting the TSconfig option to "0"
would yield a value of 255, which would enable all notifications instead
of disabling them.

Resolves: #69827
Releases: master
Change-Id: I59b8b8de3efb5c33273ea4c7dfdad2ac25473463
Reviewed-on: https://review.typo3.org/43330
Reviewed-by: Jan Helke <typo3@helke.de>
Tested-by: Jan Helke <typo3@helke.de>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
typo3/sysext/core/Classes/Authentication/BackendUserAuthentication.php
typo3/sysext/core/Classes/Type/Bitmask/JsConfirmation.php
typo3/sysext/core/Tests/Unit/Authentication/BackendUserAuthenticationTest.php