function UserAccessControlHandlerTest::passwordAccessProvider
Provides test data for passwordAccessProvider().
File
- 
              core/modules/ user/ tests/ src/ Unit/ UserAccessControlHandlerTest.php, line 338 
Class
- UserAccessControlHandlerTest
- Tests the user access controller.
Namespace
Drupal\Tests\user\UnitCode
public static function passwordAccessProvider() {
  $pass_access = [
    [
      'viewer' => 'viewer',
      'target' => 'viewer',
      'view' => FALSE,
      'edit' => TRUE,
    ],
    [
      'viewer' => 'viewer',
      'target' => 'owner',
      'view' => FALSE,
      // Anyone with edit access to the user can also edit these fields. In
      // reality edit access will already be checked on entity level and the
      // user without view access will typically not be able to edit.
'edit' => TRUE,
    ],
    [
      'viewer' => 'owner',
      'target' => 'viewer',
      'view' => FALSE,
      'edit' => TRUE,
    ],
    [
      'viewer' => 'admin',
      'target' => 'owner',
      'view' => FALSE,
      'edit' => TRUE,
    ],
  ];
  return $pass_access;
}Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.
