What these two patches do is allow you to create multiple user reference fields and assign "update" and "delete" permissions according to which field you have the user assigned too. These patches also fix a duplicate entry error when you turn on the "Views" permission checking.

This patch also creates a duplicate entry error when you have the same user assigned to multiple user reference fields in your node. I used eclipse and I auto formatted the lines so I inadvertently fixed some white-space so these patches fix some of that too.

Comments

iLLin’s picture

Better explanation would be if you have a project and you want to assign an admin, manager and user. You can have 3 user reference fields and for the admin field could have "Update" and "Delete" permissions. The manager field could have "Update" permissions. And if you install the view own module (this will restrict view permissions to node unless they have access), then the User field will only be able to view the node.

kenorb’s picture

Status: Needs review » Fixed

Great patches, thank you.
http://drupal.org/cvs?commit=348990

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

that0n3guy’s picture

I think that this may have cause this error http://drupal.org/node/780282 .

Just thought I'd let ya know.

kenorb’s picture

kenorb’s picture

Category: task » feature
Status: Closed (fixed) » Needs work

This patch probably caused followed bugs:
#781140: Not granting 'view' permissions, detailed explaination
#780282: When Rebuilding Permissions - warning: Invalid argument supplied for foreach()
#795358: Simiilar Duplicate entry problem

Reverted changes done in:
nodeaccess_autoreference_node_get_grants() and nodeaccess_autoreference_form_alter() and nodeaccess_autoreference_nodeapi()
Removed functions: _nodeaccess_autoreference_get_userref_fields() and _nodeaccess_autoreference_content_fields() and nodeaccess_autoreference_access_submit()

If you are interested with improving it, please upload new patch against current version.

kenorb’s picture

Priority: Normal » Minor
kenorb’s picture

Issue summary: View changes
Status: Needs work » Closed (outdated)

Closed because Drupal 6 is no longer supported. If the issue verifiably applies to later versions, please reopen with details and update the version.