We need better ways of filtering the nodes that can be referenced. This patch may not represent the *best* way of going about this, but it's an important feature and a useful start:

- Add a checkbox for the nodereference settings to "Limit to content owned by the same user"
- Add an "administer node references" privilege to override above setting

CommentFileSizeAuthor
nodereference_user.patch1.85 KBallie micka

Comments

jonbob’s picture

Title: Filter referenced nodes by owner » More options for allowable nodes to reference
Status: Needs review » Active

My plan for this is to have the user select a views.module view of the nodes they want to reference. There's no sense in reinventing the wheel when views.module can create node listings using virtually any set of criteria.

allie micka’s picture

Fair enough - that occured to me as well, and is probably the best approach overall.

I dislike hard-coding the filters as much as the next guy, but right now there's nothing. And in the long term, limiting by uid and an "administer node references" priv will come in handy.

Because you're not enforcing relationship rules, the selection UI is a topical change - you can always back it out later without trauma to existing data. I hope you'll consider a patch like this as an interim solution.

Thanks!

moshe weitzman’s picture

Oooh this would be quite nice. Anyoneup for it?

StevenSokulski’s picture

Version: 6.x-1.x-dev » 4.7.x-1.x-dev

By sending it through views we would be able to use the infinite power of that to do whatever is desired including (but not limited to) watch this patch allows. I would prefer this patch go away so that in the future we are not patching ontop of this patch to get rid of it. Is any work being done on using views to determine what nodes are able to be referenced?

yched’s picture

I implemented (and extended) JonBob's idea in comment #1.

The patch is here : http://drupal.org/node/78825

(I put that in a new thread, because it does a little more...)

moshe weitzman’s picture

Status: Active » Closed (duplicate)

lets use yched's patch for this. is nearly ready. see last post.