Closed (fixed)
Project:
Nodeaccess
Version:
master
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
23 Jan 2009 at 04:29 UTC
Updated:
28 Nov 2014 at 21:15 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
deviantintegral commentedI need this feature as well. In my use case, I need a user to be able to select another user in their content profile who has permission to edit and view their profile.
The way I would envision the feature is that if userreference is enabled, an additional checkbox would be enabled for that field / content type pair, along with the default permissions for that node type. You'd be able to overwrite it on a per-node basis as well just like the other permissions.
I'm going to investigate and probably start work on a patch.
Comment #2
deviantintegral commentedHere's a patch which implements this feature. It's entirely optional, and won't change anything if the userreference module isn't enabled.
It works by using the same data as the current per-user grants for a node. That way, if userreference is disabled, the permissions are still applied. As well, it means we don't have to change the database in any way. If the userreference field is changed, the previous user is deleted and the new user is inserted. If you have the grant tab enabled, you can modify the permissions from the default if needed, though they will be removed if the user reference field is changed.
Note that you do not need to enable the grant tab for this to work. Though if you do enable it, you will see the associated permissions for a user.
I've attached a screenshot of the UI change.
I'd appreciate testing on this feature so we can get it rolled in!
Comment #3
deviantintegral commentedUpdated patch which removes the default expanded setting for the fieldset which I was using while testing.
Comment #4
deviantintegral commentedUpdated patch which fixes a typo'ed call to variable_load() instead of variable_get().
Comment #5
Anonymous (not verified) commentedI have found myself in need of this functionality, I will test out the patch now.
What happens when there are multiple users referenced?
txcrew
Comment #6
Anonymous (not verified) commentedAdded, beta release should appear on the site soon.
Comment #8
joostvdl commentedRebuilding of Access Rights does not add the correct settings in the database. And resaving a node does also not work if the referenced user isn't changed. So adding this module to an exisitng site and the use of rebuilding doesn't work.
Only newly created content types are added correctly to the access table.
Comment #9
danielb commentedFYI, in response to the original post, there is already a project for this http://www.drupal.org/project/nodeaccess_userreference
Comment #10
deviantintegral commented@joostvdl can you provide more details? What you describe is exactly how I deployed the feature on my site, and it worked as expected.
Comment #11
kenorb commentedYou may try this as well:
http://drupal.org/project/nodeaccess_autoreference
Comment #12
joostvdl commented@deviantintegral : I have implemented another solution so I can't reproduce the issue anymore.
Comment #13
deviantintegral commentedMarking as postponed unless someone can replicate this.
Comment #14
muriqui commentedI just replicated this issue on a site I'm building. I had been using nodeaccess_userreference, but after seeing that this functionality had been added to nodeaccess, I decided to switch. Here's what I did:
I will save aside a snapshot of the site's state on my development server, so I can run further tests for you, if needed.
Comment #15
vlad.pavlovic commentedThis is an old issue that appears to have been fixed by deviantintegral and committed by the previous maintainer (chadcf). I am trying to clean up the issue queue. If this issue still persists (though I cannot reproduce it), please reopen it.