In a view, I’m going to hide some nodes based on user permissions. I also need to restrict the access to the node on a per-user basis. Nobody except some users that have the permissions should be able to view the node (for example via node/ID).
I thought this is a really simple task but at the moment I can’t find a good starting point. I’m anyways in my own module, defined my own content types programatically and now fiddling aroung with the permissions.
I would be thankful for any help or a good starting point. I tried a bit myself but with no real success.
So, thanks in advance…
I had also tried the Node access example and it seemed not to work but in fact it does. I just tried it as an authenticated user and then the nodes were not hidden from the view listing and I thought the example just doesn’t work for views. But as anonymous user, the ‘private’ flag does its job.
So the Node access example seems to be a good starting point and the authenticated/anonymous behavior should be fixable as well.