I installed to give referenced users permission to edit content they did not create. This works as expected.

However, I also have user profiles displayed via Panels. The user profile displays a View of a various content types, with an edit link to that content. This content type has no user reference fields, so I would think it would not be impacted by the module. Yet, when Node Access User Reference is installed, that View becomes inaccessible to most users. It still is accessible in the Admin profile, so it appears to be a permission issue. At admin/people/permissions permission is given to users. When this module is uninstalled, the View works again as expected.

The View does contain a Contextual Filter of Author ID, so it only displays content in the profile of the author.

Any ideas?

Comments

danielb’s picture

I don't know. This shouldn't happen.

Some ideas
- Get the Devel module and enable the 'devel node access' blocks, there are 2 of them, and keep an eye on those, try visiting a few affected and unaffected nodes.
- Try accessing the view without panels, versus through panels.
- Try accessing the items displayed in the view directly.
- Try creating a clone of that view and remove the contextual filter - temporarily replace the original view with the new view.

See if you can find any more clues.

itserich’s picture

Thanks for the ideas.

When Node Access User Reference is enabled, and the Content is not published, the View displays no result, whether in a panel or accessed directly.

When the Content is published, the View displays a result. When the module is disabled, the View again displays the result even if the content is unpublished.

There is no User Reference field in the content type.

If a user attempts to edit with a direct link, the editing is accessible. So, I am confused why it does not display in the View.

The result is the same with or without the Contextual Filter, without it simply displays more results.

I installed the Devel Node Access block but it only appears for Admin.. I configured it for all roles but still it only displays for Admin so does not provide any information.

itserich’s picture

A workaround is to publish the node and then use the Content Access module to make it inaccessible to most users. I had tried the View Unpublished module but it did not work as well as Content Access.

http://drupal.org/project/content_access

When published the View displays as expected.

danielb’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

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

lendude’s picture

Category: support » bug
Status: Closed (fixed) » Active

We ran into the same problem using Node access user reference 3.6 and Views 3.3.

- Enable Node access user reference
- Set up a Node access user reference field, with 'When to set grants' => 'When the user reference field is in use'
- Build a View of nodes
- Show unpublished content in the View
- Give users access to own unpublished content
- Unpublished content where the user reference field is not set, is not shown to the author in the View but IS viewable/editable by the author
- If the user reference field is set, it shows up in the View
- Disable Node access user reference
- Unpublished content where user reference field is not set IS shown in the View

Our workaround was to set up universial viewing with Node access user reference (so 'When to set grants' => 'always' and 'Grants for all users' view checkbox checked). This will make the node show up in the View, but will make unpublished content viewable by all users (including anon).
So we then set up a Rule redirecting all users trying to view a unpublished node that were not the author or the referenced user.

Gets the job done, but this does not appear to be fixed.

Len

danielb’s picture

Category: bug » support
Status: Active » Closed (fixed)

Please don't report bugs on old versions of the module.

SeanA’s picture

Version: 7.x-3.6 » 7.x-3.10
Category: Support request » Bug report
Issue summary: View changes
Status: Closed (fixed) » Active

The original problem still exists. Some Views become unavailable (no results in the View) for no apparent reason upon activation of this module.

giupenni’s picture

I have the same problem.
For admin works.

spaghettibolognese’s picture

We are seeing this problem too after a core update from 7.18 to 7.42.

johnv’s picture

There is a difference between the following situations:
- the view is inaccessible after installation of this module --> check your settings, and perhaps Devel Access Debug (activate the access block from devel module) and check if the node is viewable at all
- the view is inaccessible after update of this module/core --> this would be an error.

Also, see #7

spaghettibolognese’s picture

Version: 7.x-3.10 » 7.x-3.x-dev

Just a pingback; the patch in https://www.drupal.org/node/1349080#comment-10742796 fixed out problems. node_access seems to be broken when using left join's in views.

Also, the problems are occurring with the latest core version and latest contrib.

giupenni’s picture

danielb’s picture

Category: Bug report » Support request
Status: Active » Closed (fixed)

OK here's the thing, the original support request was probably a misconfiguration or a misunderstanding of how the module is intended to work. It was shown to be solved by using another node access module to first disable access to a node, and then use this module to grant access. That worked.

There is no good reason to go back to an old issue and reopen it. If you're having a problem that on the surface sounds like it has some of the same concepts involved - it could still be a different problem.

In this case it sounds like it's a bug outside of this module caused by a core update, so I hope this demonstrates to you why it is always a better idea to create a new issue than to reopen an old one.

And in this case one user went to other issues in this project that mentioned views and reopened them also :/

SeanA’s picture

Status: Closed (fixed) » Closed (won't fix)

Maintainer refuses to acknowledge there's any problem. =/

danielb’s picture

There's a problem alright

You reopen unrelated issues, and this is fixed by the core patch in #12