‪TYPO3CMS  ‪main
BackendUserAuthenticationTest.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
5 /*
6  * This file is part of the TYPO3 CMS project.
7  *
8  * It is free software; you can redistribute it and/or modify it under
9  * the terms of the GNU General Public License, either version 2
10  * of the License, or any later version.
11  *
12  * For the full copyright and license information, please read the
13  * LICENSE.txt file that was distributed with this source code.
14  *
15  * The TYPO3 project - inspiring people to share!
16  */
17 
19 
20 use PHPUnit\Framework\Attributes\DataProvider;
21 use PHPUnit\Framework\Attributes\Test;
22 use Psr\EventDispatcher\EventDispatcherInterface;
23 use Psr\EventDispatcher\ListenerProviderInterface;
24 use Psr\Log\NullLogger;
33 use TYPO3\CMS\Core\Database\Query\QueryBuilder;
45 use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
46 
47 final class ‪BackendUserAuthenticationTest extends UnitTestCase
48 {
49  protected bool ‪$resetSingletonInstances = true;
50 
51  #[Test]
53  {
54  ‪$GLOBALS['LANG'] = $this->createMock(LanguageService::class);
55  $connectionMock = $this->createMock(Connection::class);
56  $connectionMock->method('delete')->with('sys_lockedrecords', self::anything())->willReturn(1);
57 
58  $connectionPoolMock = $this->createMock(ConnectionPool::class);
59  $connectionPoolMock->method('getConnectionForTable')->with(self::anything())->willReturn($connectionMock);
60 
61  GeneralUtility::addInstance(ConnectionPool::class, $connectionPoolMock);
62 
63  $formProtectionMock = $this->createMock(BackendFormProtection::class);
64  $formProtectionMock->expects(self::once())->method('clean');
65 
66  $runtimeCache = new ‪VariableFrontend('null', new ‪TransientMemoryBackend('null', ['logger' => new NullLogger()]));
67  $formProtectionFactory = new ‪FormProtectionFactory(
68  $this->createMock(FlashMessageService::class),
69  $this->createMock(LanguageServiceFactory::class),
70  $this->createMock(Registry::class),
71  $runtimeCache
72  );
73  GeneralUtility::addInstance(FormProtectionFactory::class, $formProtectionFactory);
74  GeneralUtility::addInstance(BackendFormProtection::class, $formProtectionMock);
75  GeneralUtility::setSingletonInstance(EventDispatcherInterface::class, new ‪EventDispatcher($this->createMock(ListenerProviderInterface::class)));
76 
77  $sessionBackendMock = $this->createMock(SessionBackendInterface::class);
78  $sessionBackendMock->method('remove')->with(self::anything())->willReturn(true);
79  $userSessionManager = new ‪UserSessionManager(
80  $sessionBackendMock,
81  86400,
82  new ‪IpLocker(0, 0),
83  'BE'
84  );
85 
86  ‪$GLOBALS['BE_USER'] = $this->getMockBuilder(BackendUserAuthentication::class)->getMock();
87  ‪$GLOBALS['BE_USER']->user = [
88  'uid' => 4711,
89  ];
90  ‪$GLOBALS['BE_USER']->setLogger(new NullLogger());
91  ‪$GLOBALS['BE_USER']->initializeUserSessionManager($userSessionManager);
92 
93  $subject = $this->getMockBuilder(BackendUserAuthentication::class)
94  ->onlyMethods([])
95  ->disableOriginalConstructor()
96  ->getMock();
97 
98  $subject->setLogger(new NullLogger());
99  $subject->initializeUserSessionManager($userSessionManager);
100  $subject->logoff();
101  }
102 
104  {
105  return [
106  'Only read permissions' => [
107  [
108  'addFile' => 0,
109  'readFile' => 1,
110  'writeFile' => 0,
111  'copyFile' => 0,
112  'moveFile' => 0,
113  'renameFile' => 0,
114  'deleteFile' => 0,
115  'addFolder' => 0,
116  'readFolder' => 1,
117  'copyFolder' => 0,
118  'moveFolder' => 0,
119  'renameFolder' => 0,
120  'writeFolder' => 0,
121  'deleteFolder' => 0,
122  'recursivedeleteFolder' => 0,
123  ],
124  ],
125  'Uploading allowed' => [
126  [
127  'addFile' => 1,
128  'readFile' => 1,
129  'writeFile' => 1,
130  'copyFile' => 1,
131  'moveFile' => 1,
132  'renameFile' => 1,
133  'deleteFile' => 1,
134  'addFolder' => 0,
135  'readFolder' => 1,
136  'copyFolder' => 0,
137  'moveFolder' => 0,
138  'renameFolder' => 0,
139  'writeFolder' => 0,
140  'deleteFolder' => 0,
141  'recursivedeleteFolder' => 0,
142  ],
143  ],
144  'One value is enough' => [
145  [
146  'addFile' => 1,
147  ],
148  ],
149  ];
150  }
151 
152  #[DataProvider('getFilePermissionsTakesUserDefaultAndStoragePermissionsIntoAccountIfUserIsNotAdminDataProvider')]
153  #[Test]
155  {
156  $subject = $this->getMockBuilder(BackendUserAuthentication::class)
157  ->onlyMethods(['isAdmin', 'getTSConfig'])
158  ->getMock();
159 
160  $subject
161  ->method('isAdmin')
162  ->willReturn(false);
163 
164  $subject->setLogger(new NullLogger());
165  $subject
166  ->method('getTSConfig')
167  ->willReturn([
168  'permissions.' => [
169  'file.' => [
170  'default.' => $userTsConfiguration,
171  ],
172  ],
173  ]);
174  $defaultFilePermissions = [
175  // File permissions
176  'addFile' => false,
177  'readFile' => false,
178  'writeFile' => false,
179  'copyFile' => false,
180  'moveFile' => false,
181  'renameFile' => false,
182  'deleteFile' => false,
183  // Folder permissions
184  'addFolder' => false,
185  'readFolder' => false,
186  'writeFolder' => false,
187  'copyFolder' => false,
188  'moveFolder' => false,
189  'renameFolder' => false,
190  'deleteFolder' => false,
191  'recursivedeleteFolder' => false,
192  ];
193  $expectedPermissions = array_merge($defaultFilePermissions, $userTsConfiguration);
194  array_walk(
195  $expectedPermissions,
196  static function (&$value) {
197  $value = (bool)$value;
198  }
199  );
200 
201  self::assertEquals($expectedPermissions, $subject->getFilePermissions());
202  }
203 
205  {
206  return [
207  'No permission' => [
208  '',
209  [
210  'addFile' => false,
211  'readFile' => false,
212  'writeFile' => false,
213  'copyFile' => false,
214  'moveFile' => false,
215  'renameFile' => false,
216  'deleteFile' => false,
217  'addFolder' => false,
218  'readFolder' => false,
219  'copyFolder' => false,
220  'moveFolder' => false,
221  'renameFolder' => false,
222  'writeFolder' => false,
223  'deleteFolder' => false,
224  'recursivedeleteFolder' => false,
225  ],
226  ],
227  'Standard file permissions' => [
228  'addFile,readFile,writeFile,copyFile,moveFile,renameFile,deleteFile',
229  [
230  'addFile' => true,
231  'readFile' => true,
232  'writeFile' => true,
233  'copyFile' => true,
234  'moveFile' => true,
235  'renameFile' => true,
236  'deleteFile' => true,
237  'addFolder' => false,
238  'readFolder' => false,
239  'copyFolder' => false,
240  'moveFolder' => false,
241  'renameFolder' => false,
242  'writeFolder' => false,
243  'deleteFolder' => false,
244  'recursivedeleteFolder' => false,
245  ],
246  ],
247  'Standard folder permissions' => [
248  'addFolder,readFolder,moveFolder,renameFolder,writeFolder,deleteFolder',
249  [
250  'addFile' => false,
251  'readFile' => false,
252  'writeFile' => false,
253  'copyFile' => false,
254  'moveFile' => false,
255  'renameFile' => false,
256  'deleteFile' => false,
257  'addFolder' => true,
258  'readFolder' => true,
259  'writeFolder' => true,
260  'copyFolder' => false,
261  'moveFolder' => true,
262  'renameFolder' => true,
263  'deleteFolder' => true,
264  'recursivedeleteFolder' => false,
265  ],
266  ],
267  'Copy folder allowed' => [
268  'readFolder,copyFolder',
269  [
270  'addFile' => false,
271  'readFile' => false,
272  'writeFile' => false,
273  'copyFile' => false,
274  'moveFile' => false,
275  'renameFile' => false,
276  'deleteFile' => false,
277  'addFolder' => false,
278  'readFolder' => true,
279  'writeFolder' => false,
280  'copyFolder' => true,
281  'moveFolder' => false,
282  'renameFolder' => false,
283  'deleteFolder' => false,
284  'recursivedeleteFolder' => false,
285  ],
286  ],
287  'Copy folder and remove subfolders allowed' => [
288  'readFolder,copyFolder,recursivedeleteFolder',
289  [
290  'addFile' => false,
291  'readFile' => false,
292  'writeFile' => false,
293  'copyFile' => false,
294  'moveFile' => false,
295  'renameFile' => false,
296  'deleteFile' => false,
297  'addFolder' => false,
298  'readFolder' => true,
299  'writeFolder' => false,
300  'copyFolder' => true,
301  'moveFolder' => false,
302  'renameFolder' => false,
303  'deleteFolder' => false,
304  'recursivedeleteFolder' => true,
305  ],
306  ],
307  ];
308  }
309 
310  #[DataProvider('getFilePermissionsTakesUserDefaultPermissionsFromRecordIntoAccountIfUserIsNotAdminDataProvider')]
311  #[Test]
312  public function ‪getFilePermissionsTakesUserDefaultPermissionsFromRecordIntoAccountIfUserIsNotAdmin(string $permissionValue, array $expectedPermissions): void
313  {
314  $subject = $this->getMockBuilder(BackendUserAuthentication::class)
315  ->onlyMethods(['isAdmin', 'getTSConfig'])
316  ->getMock();
317 
318  $subject
319  ->method('isAdmin')
320  ->willReturn(false);
321 
322  $subject
323  ->method('getTSConfig')
324  ->willReturn([]);
325  $subject->groupData['file_permissions'] = $permissionValue;
326  self::assertEquals($expectedPermissions, $subject->getFilePermissions());
327  }
328 
329  #[Test]
331  {
332  $subject = $this->getMockBuilder(BackendUserAuthentication::class)
333  ->onlyMethods(['isAdmin'])
334  ->getMock();
335 
336  $subject
337  ->method('isAdmin')
338  ->willReturn(true);
339 
340  $expectedPermissions = [
341  'addFile' => true,
342  'readFile' => true,
343  'writeFile' => true,
344  'copyFile' => true,
345  'moveFile' => true,
346  'renameFile' => true,
347  'deleteFile' => true,
348  'addFolder' => true,
349  'readFolder' => true,
350  'writeFolder' => true,
351  'copyFolder' => true,
352  'moveFolder' => true,
353  'renameFolder' => true,
354  'deleteFolder' => true,
355  'recursivedeleteFolder' => true,
356  ];
357 
358  self::assertEquals($expectedPermissions, $subject->getFilePermissions());
359  }
360 
361  #[Test]
363  {
364  $subject = $this->getMockBuilder(BackendUserAuthentication::class)
365  ->onlyMethods(['getTSConfig'])
366  ->getMock();
367  $subject->method('getTSConfig')->with()->willReturn([
368  'options.' => [
369  'alertPopups' => 1,
370  ],
371  ]);
372  self::assertTrue($subject->jsConfirmation(‪JsConfirmation::TYPE_CHANGE));
373  self::assertFalse($subject->jsConfirmation(‪JsConfirmation::COPY_MOVE_PASTE));
374  }
375 
376  #[Test]
378  {
379  $subject = $this->getMockBuilder(BackendUserAuthentication::class)
380  ->onlyMethods(['getTSConfig'])
381  ->getMock();
382  $subject->method('getTSConfig')->with()->willReturn([
383  'options.' => [
384  'alertPopups' => 3,
385  ],
386  ]);
387  self::assertTrue($subject->jsConfirmation(‪JsConfirmation::TYPE_CHANGE));
388  self::assertTrue($subject->jsConfirmation(‪JsConfirmation::COPY_MOVE_PASTE));
389  }
390 
391  #[DataProvider('jsConfirmationsWithUnsetBits')]
392  #[Test]
393  public function ‪jsConfirmationAllowsUnsettingBitsInValue(int $jsConfirmation, bool $typeChangeAllowed, bool $copyMovePasteAllowed, bool $deleteAllowed, bool $feEditAllowed, bool $otherAllowed): void
394  {
395  $subject = $this->getMockBuilder(BackendUserAuthentication::class)
396  ->onlyMethods(['getTSConfig'])
397  ->getMock();
398  $subject->method('getTSConfig')->with()->willReturn([
399  'options.' => [
400  'alertPopups' => $jsConfirmation,
401  ],
402  ]);
403  self::assertEquals($typeChangeAllowed, $subject->jsConfirmation(‪JsConfirmation::TYPE_CHANGE));
404  self::assertEquals($copyMovePasteAllowed, $subject->jsConfirmation(‪JsConfirmation::COPY_MOVE_PASTE));
405  self::assertEquals($deleteAllowed, $subject->jsConfirmation(‪JsConfirmation::DELETE));
406  self::assertEquals($feEditAllowed, $subject->jsConfirmation(‪JsConfirmation::FE_EDIT));
407  self::assertEquals($otherAllowed, $subject->jsConfirmation(‪JsConfirmation::OTHER));
408  }
409 
410  public static function ‪jsConfirmationsWithUnsetBits(): array
411  {
412  return [
413  'All except "type change" and "copy/move/paste"' => [
414  252,
415  false,
416  false,
417  true,
418  true,
419  true,
420  ],
421  'All except "other"' => [
422  127,
423  true,
424  true,
425  true,
426  true,
427  false,
428  ],
429  ];
430  }
431 
432  #[Test]
434  {
435  $subject = $this->getMockBuilder(BackendUserAuthentication::class)
436  ->onlyMethods(['getTSConfig'])
437  ->getMock();
438  $subject->method('getTSConfig')->with()->willReturn([
439  'options.' => [
440  'alertPopups' => 0,
441  ],
442  ]);
443  self::assertFalse($subject->jsConfirmation(‪JsConfirmation::TYPE_CHANGE));
444  self::assertFalse($subject->jsConfirmation(‪JsConfirmation::COPY_MOVE_PASTE));
445  }
446 
447  #[Test]
449  {
450  $subject = $this->getMockBuilder(BackendUserAuthentication::class)
451  ->onlyMethods(['getTSConfig'])
452  ->getMock();
453 
454  self::assertTrue($subject->jsConfirmation(‪JsConfirmation::TYPE_CHANGE));
455  }
456 
466  {
467  return [
468  'for admin' => [
469  1,
470  true,
471  [],
472  ' 1=1',
473  ],
474  'for admin with groups' => [
475  11,
476  true,
477  [1, 2],
478  ' 1=1',
479  ],
480  'for user' => [
481  2,
482  false,
483  [],
484  ' (((`pages`.`perms_everybody` & 2 = 2) OR' .
485  ' (((`pages`.`perms_userid` = 123) AND (`pages`.`perms_user` & 2 = 2)))))',
486  ],
487  'for user with groups' => [
488  8,
489  false,
490  [1, 2],
491  ' (((`pages`.`perms_everybody` & 8 = 8) OR' .
492  ' (((`pages`.`perms_userid` = 123) AND (`pages`.`perms_user` & 8 = 8)))' .
493  ' OR (((`pages`.`perms_groupid` IN (1, 2)) AND (`pages`.`perms_group` & 8 = 8)))))',
494  ],
495  ];
496  }
497 
498  #[DataProvider('getPagePermissionsClauseWithValidUserDataProvider')]
499  #[Test]
500  public function ‪getPagePermissionsClauseWithValidUser(int $perms, bool $admin, array $groups, string $expected): void
501  {
502  // We only need to setup the mocking for the non-admin cases
503  // If this setup is done for admin cases the FIFO behavior
504  // of GeneralUtility::addInstance will influence other tests
505  // as the ConnectionPool is never used!
506  if (!$admin) {
507  $connectionMock = $this->createMock(Connection::class);
508  $connectionMock->method('getDatabasePlatform')->willReturn(new ‪MockMySQLPlatform());
509  $connectionMock->method('quoteIdentifier')
510  ->willReturnCallback(fn(string ‪$identifier): string => '`' . str_replace('.', '`.`', ‪$identifier) . '`');
511 
512  $queryBuilderMock = $this->createMock(QueryBuilder::class);
513  $queryBuilderMock->method('expr')->willReturn(
514  new ‪ExpressionBuilder($connectionMock)
515  );
516 
517  $connectionPoolMock = $this->createMock(ConnectionPool::class);
518  $connectionPoolMock->method('getQueryBuilderForTable')->with('pages')->willReturn($queryBuilderMock);
519  // Shift previously added instance
520  GeneralUtility::makeInstance(ConnectionPool::class);
521  GeneralUtility::addInstance(ConnectionPool::class, $connectionPoolMock);
522  }
523 
524  $subject = $this->getMockBuilder(BackendUserAuthentication::class)
525  ->onlyMethods(['isAdmin'])
526  ->getMock();
527  $subject->setLogger(new NullLogger());
528  $subject
529  ->method('isAdmin')
530  ->willReturn($admin);
531 
532  $subject->user = ['uid' => 123];
533  $subject->userGroupsUID = $groups;
534 
535  self::assertEquals($expected, $subject->getPagePermsClause($perms));
536  }
537 
538  #[DataProvider('checkAuthModeReturnsExpectedValueDataProvider')]
539  #[Test]
540  public function ‪checkAuthModeReturnsExpectedValue(string $theValue, bool $expectedResult): void
541  {
542  $subject = $this->getMockBuilder(BackendUserAuthentication::class)
543  ->disableOriginalConstructor()
544  ->onlyMethods(['isAdmin'])
545  ->getMock();
546 
547  $subject
548  ->method('isAdmin')
549  ->willReturn(false);
550 
551  $subject->groupData['explicit_allowdeny'] =
552  'dummytable:dummyfield:explicitly_allowed_value,'
553  . 'dummytable:dummyfield:explicitly_denied_value';
554 
555  $result = $subject->checkAuthMode('dummytable', 'dummyfield', $theValue);
556  self::assertEquals($expectedResult, $result);
557  }
558 
559  public static function ‪checkAuthModeReturnsExpectedValueDataProvider(): array
560  {
561  return [
562  'explicit allow, not allowed value' => [
563  'non_allowed_field',
564  false,
565  ],
566  'explicit allow, allowed value' => [
567  'explicitly_allowed_value',
568  true,
569  ],
570  'invalid value colon' => [
571  'containing:invalid:chars',
572  false,
573  ],
574  'invalid value comma' => [
575  'containing,invalid,chars',
576  false,
577  ],
578  'blank value' => [
579  '',
580  true,
581  ],
582  'divider' => [
583  '--div--',
584  true,
585  ],
586  ];
587  }
588 }
‪TYPO3\CMS\Core\Localization\LanguageServiceFactory
Definition: LanguageServiceFactory.php:25
‪TYPO3\CMS\Core\Tests\Unit\Authentication\BackendUserAuthenticationTest\jsConfirmationReturnsTrueIfPassedValueEqualsConfiguration
‪jsConfirmationReturnsTrueIfPassedValueEqualsConfiguration()
Definition: BackendUserAuthenticationTest.php:362
‪TYPO3\CMS\Core\Cache\Backend\TransientMemoryBackend
Definition: TransientMemoryBackend.php:25
‪TYPO3\CMS\Core\Database\Query\Expression\ExpressionBuilder
Definition: ExpressionBuilder.php:40
‪TYPO3\CMS\Core\Tests\Unit\Authentication\BackendUserAuthenticationTest\getPagePermissionsClauseWithValidUserDataProvider
‪static getPagePermissionsClauseWithValidUserDataProvider()
Definition: BackendUserAuthenticationTest.php:465
‪TYPO3\CMS\Core\Tests\Unit\Authentication\BackendUserAuthenticationTest\jsConfirmationReturnsTrueIfConfigurationIsMissing
‪jsConfirmationReturnsTrueIfConfigurationIsMissing()
Definition: BackendUserAuthenticationTest.php:448
‪TYPO3\CMS\Core\Tests\Unit\Authentication
Definition: AuthenticationServiceTest.php:18
‪TYPO3\CMS\Core\Registry
Definition: Registry.php:33
‪TYPO3\CMS\Core\FormProtection\BackendFormProtection
Definition: BackendFormProtection.php:75
‪TYPO3\CMS\Core\Tests\Unit\Authentication\BackendUserAuthenticationTest\getFilePermissionsTakesUserDefaultPermissionsFromRecordIntoAccountIfUserIsNotAdmin
‪getFilePermissionsTakesUserDefaultPermissionsFromRecordIntoAccountIfUserIsNotAdmin(string $permissionValue, array $expectedPermissions)
Definition: BackendUserAuthenticationTest.php:312
‪TYPO3\CMS\Core\Authentication\JsConfirmation
Definition: JsConfirmation.php:28
‪TYPO3\CMS\Core\Tests\Unit\Authentication\BackendUserAuthenticationTest\getPagePermissionsClauseWithValidUser
‪getPagePermissionsClauseWithValidUser(int $perms, bool $admin, array $groups, string $expected)
Definition: BackendUserAuthenticationTest.php:500
‪TYPO3\CMS\Core\Authentication\JsConfirmation\OTHER
‪const OTHER
Definition: JsConfirmation.php:36
‪TYPO3\CMS\Core\Tests\Unit\Authentication\BackendUserAuthenticationTest\getFilePermissionsTakesUserDefaultPermissionsFromTsConfigIntoAccountIfUserIsNotAdmin
‪getFilePermissionsTakesUserDefaultPermissionsFromTsConfigIntoAccountIfUserIsNotAdmin(array $userTsConfiguration)
Definition: BackendUserAuthenticationTest.php:154
‪TYPO3\CMS\Core\EventDispatcher\EventDispatcher
Definition: EventDispatcher.php:30
‪TYPO3\CMS\Core\Cache\Frontend\VariableFrontend
Definition: VariableFrontend.php:25
‪TYPO3\CMS\Core\Session\Backend\SessionBackendInterface
Definition: SessionBackendInterface.php:28
‪TYPO3\CMS\Core\Authentication\JsConfirmation\TYPE_CHANGE
‪const TYPE_CHANGE
Definition: JsConfirmation.php:29
‪TYPO3\CMS\Core\Authentication\BackendUserAuthentication
Definition: BackendUserAuthentication.php:62
‪TYPO3\CMS\Core\Tests\Unit\Authentication\BackendUserAuthenticationTest\getFilePermissionsGrantsAllPermissionsToAdminUsers
‪getFilePermissionsGrantsAllPermissionsToAdminUsers()
Definition: BackendUserAuthenticationTest.php:330
‪TYPO3\CMS\Core\Authentication\JsConfirmation\DELETE
‪const DELETE
Definition: JsConfirmation.php:31
‪TYPO3\CMS\Core\Database\Connection
Definition: Connection.php:41
‪TYPO3\CMS\Core\FormProtection\FormProtectionFactory
Definition: FormProtectionFactory.php:43
‪TYPO3\CMS\Core\Tests\Unit\Authentication\BackendUserAuthenticationTest\jsConfirmationAllowsUnsettingBitsInValue
‪jsConfirmationAllowsUnsettingBitsInValue(int $jsConfirmation, bool $typeChangeAllowed, bool $copyMovePasteAllowed, bool $deleteAllowed, bool $feEditAllowed, bool $otherAllowed)
Definition: BackendUserAuthenticationTest.php:393
‪$GLOBALS
‪$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['adminpanel']['modules']
Definition: ext_localconf.php:25
‪TYPO3\CMS\Core\Tests\Unit\Authentication\BackendUserAuthenticationTest\jsConfirmationsWithUnsetBits
‪static jsConfirmationsWithUnsetBits()
Definition: BackendUserAuthenticationTest.php:410
‪TYPO3\CMS\Core\Tests\Unit\Authentication\BackendUserAuthenticationTest\getFilePermissionsTakesUserDefaultPermissionsFromRecordIntoAccountIfUserIsNotAdminDataProvider
‪static getFilePermissionsTakesUserDefaultPermissionsFromRecordIntoAccountIfUserIsNotAdminDataProvider()
Definition: BackendUserAuthenticationTest.php:204
‪TYPO3\CMS\Core\Tests\Unit\Authentication\BackendUserAuthenticationTest\jsConfirmationAlwaysReturnsFalseIfNoConfirmationIsSet
‪jsConfirmationAlwaysReturnsFalseIfNoConfirmationIsSet()
Definition: BackendUserAuthenticationTest.php:433
‪TYPO3\CMS\Core\Tests\Unit\Database\Mocks\MockPlatform\MockMySQLPlatform
Definition: MockMySQLPlatform.php:24
‪TYPO3\CMS\Core\Tests\Unit\Authentication\BackendUserAuthenticationTest\checkAuthModeReturnsExpectedValue
‪checkAuthModeReturnsExpectedValue(string $theValue, bool $expectedResult)
Definition: BackendUserAuthenticationTest.php:540
‪TYPO3\CMS\Core\Localization\LanguageService
Definition: LanguageService.php:46
‪TYPO3\CMS\Core\Database\ConnectionPool
Definition: ConnectionPool.php:46
‪TYPO3\CMS\Core\Authentication\IpLocker
Definition: IpLocker.php:26
‪TYPO3\CMS\Core\Tests\Unit\Authentication\BackendUserAuthenticationTest\jsConfirmationAllowsSettingMultipleBitsInValue
‪jsConfirmationAllowsSettingMultipleBitsInValue()
Definition: BackendUserAuthenticationTest.php:377
‪TYPO3\CMS\Core\Tests\Unit\Authentication\BackendUserAuthenticationTest\logoffCleansFormProtectionIfBackendUserIsLoggedIn
‪logoffCleansFormProtectionIfBackendUserIsLoggedIn()
Definition: BackendUserAuthenticationTest.php:52
‪TYPO3\CMS\Core\Utility\GeneralUtility
Definition: GeneralUtility.php:52
‪TYPO3\CMS\Core\Authentication\JsConfirmation\FE_EDIT
‪const FE_EDIT
Definition: JsConfirmation.php:32
‪TYPO3\CMS\Core\Tests\Unit\Authentication\BackendUserAuthenticationTest\checkAuthModeReturnsExpectedValueDataProvider
‪static checkAuthModeReturnsExpectedValueDataProvider()
Definition: BackendUserAuthenticationTest.php:559
‪TYPO3\CMS\Core\Tests\Unit\Authentication\BackendUserAuthenticationTest\$resetSingletonInstances
‪bool $resetSingletonInstances
Definition: BackendUserAuthenticationTest.php:49
‪TYPO3\CMS\Core\Messaging\FlashMessageService
Definition: FlashMessageService.php:27
‪TYPO3\CMS\Core\Tests\Unit\Authentication\BackendUserAuthenticationTest
Definition: BackendUserAuthenticationTest.php:48
‪TYPO3\CMS\Core\Session\UserSessionManager
Definition: UserSessionManager.php:46
‪TYPO3\CMS\Core\Authentication\JsConfirmation\COPY_MOVE_PASTE
‪const COPY_MOVE_PASTE
Definition: JsConfirmation.php:30
‪TYPO3\CMS\Webhooks\Message\$identifier
‪identifier readonly string $identifier
Definition: FileAddedMessage.php:37
‪TYPO3\CMS\Core\Tests\Unit\Authentication\BackendUserAuthenticationTest\getFilePermissionsTakesUserDefaultAndStoragePermissionsIntoAccountIfUserIsNotAdminDataProvider
‪static getFilePermissionsTakesUserDefaultAndStoragePermissionsIntoAccountIfUserIsNotAdminDataProvider()
Definition: BackendUserAuthenticationTest.php:103