I create a relationship type called "friend". (For simplicity let's say it is two-way and does not require approval, but it doesn't make a difference.)
I create three users, Alice, Bob, and Charlie, allowing them to create content, have and maintain relationships, and grant view permission to related users.
Alice creates a node called "Hello all", without checking any boxes in the "Post to social network" options, which makes it accessible to all users. So far, so good. Bob and Charlie are now able to access that node.
Alice sets Bob as her "friend". Then Alice creates a node called "Hello friends", checking the box to grant view permission only to friends. Again, so far, so good. Now Bob can see both of her nodes, while Charlie can only see "Hello all."
Now I add another relationship type: "associate". Alice sets Charlie as her "associate."
Now there is a problem. For some reason, Bob has lost access "Hello friends", but he can still see "Hello all".
If I delete the relationship type "associate", Bob is once again able to access "Hello friends".
This behavior occurs even if both relationship types are created from the onset.
This has made it impossible for me to use UR-Node access at the same time as multiple relationship types.
Comments
Comment #1
VSZ commentedI experience the same issue.
Comment #2
mrf commentedComment #3
berdirWondering if this has been fixed in the meantime as there were no more confirmations in over a year.
If it is still an issue, 7.x-1.x might be affected too. We really need tests for that module, they should be rather easy to write and it's a tedious task for manual testing.
Justing adding tests to confirm that bug is still open would probably already cover most of the code (test single relationship, then add second, test again).
Comment #4
mrf commentedThis scenario passes the tests I created in #1463560: Tests for user_relationship_node_access so I'm going to assume this is working correctly.