Problem/Motivation
Working on #2291055: Creation of entity type user without credential is not working (Create a Resource for user registration) I have detected that I cannot create user entities. When I try it the response is {"error":"Access denied on creating field pass"}.
Proposed resolution
As @Berdir proposed at #2291055: Creation of entity type user without credential is not working (Create a Resource for user registration) the usage of create here is not correct.
foreach ($entity as $field_name => $field) {
if (!$field->access('create')) {
throw new AccessDeniedHttpException(String::format('Access denied on creating field @field', array('@field' => $field_name)));
}
}
"CreateTest" covers node and entity_test but we should cover the user entity too.