diff --git a/core/modules/node/node.install b/core/modules/node/node.install index 92bf346..eaa022c 100644 --- a/core/modules/node/node.install +++ b/core/modules/node/node.install @@ -430,8 +430,10 @@ function node_install() { // there is hardly a point in installing the Node module without granting // these permissions. Doing so also allows tests to continue to operate as // expected without first having to manually grant these default permissions. - user_role_grant_permissions(DRUPAL_ANONYMOUS_RID, array('access content')); - user_role_grant_permissions(DRUPAL_AUTHENTICATED_RID, array('access content')); + if (\Drupal::moduleHandler()->moduleExists('user')) { + user_role_grant_permissions(DRUPAL_ANONYMOUS_RID, array('access content')); + user_role_grant_permissions(DRUPAL_AUTHENTICATED_RID, array('access content')); + } // Populate the node access table. db_insert('node_access')