ah i see you have to add the policy to the PolicyController:
public function canGetAjaxList(IdentityInterface $user, User $resource)
{
return true;
}
and also edit the function in the UserController:
$user = $this->Users->get($this->request->getAttribute(‘identity’)->getIdentifier(), [
‘contain’ => [‘Details’],
]);