function UserAccessControlHandlerTest::adminFieldAccessProvider
Same name in other branches
- 9 core/modules/user/tests/src/Unit/UserAccessControlHandlerTest.php \Drupal\Tests\user\Unit\UserAccessControlHandlerTest::adminFieldAccessProvider()
- 8.9.x core/modules/user/tests/src/Unit/UserAccessControlHandlerTest.php \Drupal\Tests\user\Unit\UserAccessControlHandlerTest::adminFieldAccessProvider()
- 10 core/modules/user/tests/src/Unit/UserAccessControlHandlerTest.php \Drupal\Tests\user\Unit\UserAccessControlHandlerTest::adminFieldAccessProvider()
Provides test data for testAdminFieldAccess().
File
-
core/
modules/ user/ tests/ src/ Unit/ UserAccessControlHandlerTest.php, line 288
Class
- UserAccessControlHandlerTest
- Tests the user access controller.
Namespace
Drupal\Tests\user\UnitCode
public static function adminFieldAccessProvider() {
$access_info = [];
$fields = [
'roles',
'status',
'access',
'login',
'init',
];
foreach ($fields as $field) {
$access_info[] = [
'field' => $field,
'viewer' => 'viewer',
'target' => 'viewer',
'view' => FALSE,
'edit' => FALSE,
];
$access_info[] = [
'field' => $field,
'viewer' => 'viewer',
'target' => 'owner',
'view' => FALSE,
'edit' => FALSE,
];
$access_info[] = [
'field' => $field,
'viewer' => 'admin',
'target' => 'owner',
'view' => TRUE,
'edit' => TRUE,
];
}
return $access_info;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.