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.

Files: 
CommentFileSizeAuthor
#1 1329446.1-hook-node-prepare.patch1.21 KBdeviantintegral
PASSED: [[SimpleTest]]: [MySQL] 995 pass(es).
[ View ]

Comments

Assigned:deviantintegral» Unassigned
Status:Active» Needs review
StatusFileSize
new1.21 KB
PASSED: [[SimpleTest]]: [MySQL] 995 pass(es).
[ View ]

Here's a completely untested patch.

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

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..."