Lost grants when user reference value changed

Created on 14 March 2011, over 14 years ago
Updated 25 September 2025, 11 days ago

Here's a problem i'm noticing. I'm not completely convinced this is actually a bug - I'd think someone else would have noticed this by now (maybe i'm totally missing something). But it seems that way.

I have a cck type with a user reference field. When i have a saved grant on a node and then change a user reference value, the grant on the node gets removed. I traced this back to function nodeaccess_insert_userreference, and noticed the logic doesn't check if a user reference field is enabled in the node type settings at /admin/user/nodeaccess. The attached patch adds a check in functions nodeaccess_insert_userreference and nodeaccess_delete_userreference.

🐛 Bug report
Status

Postponed: needs info

Version

1.0

Component

Code

Created by

🇨🇦Canada Nick Robillard

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

No activities found.

Production build 0.71.5 2024