If another module creates a node manually and saves it, default URNA ACLs aren't applied. We need to implement hook_node_prepare() to apply them.

Members fund testing for the Drupal project. Drupal Association Learn more


deviantintegral’s picture

Assigned: deviantintegral » Unassigned
Status: Active » Needs review
1.21 KB

Here's a completely untested patch.

Berdir’s picture

#1: 1329446.1-hook-node-prepare.patch queued for re-testing.

Berdir’s picture

Status: Needs review » Needs work
+++ b/user_relationship_node_access/user_relationship_node_access.module
@@ -279,6 +279,27 @@ function user_relationship_node_access_form_user_relationships_admin_settings_al
+  // if user is not allowed to effect perms, do not change access settings
+  $allowed_grants = _user_relationship_node_access_get_allowed_grants($user);
+  if (!count($allowed_grants)) {
+    return;
+  }
+  // if no content type isn't included, do not change access settings
+  if (!_user_relationship_node_access_node_eligible($node)) {
+    return;
+  }

Patch no longer applies.

In case you manage to do a re-roll, please fix those comments to start with an upper case character and end wit ha .

Also, the second comment is a double negotation but shouldn't be, should be "If content type isn't eligible..."