Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 298134

Cannot create user entities - {"error":"Access denied on creating field pass"}

$
0
0

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.


Viewing all articles
Browse latest Browse all 298134

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>