I have three content types :
Content type A
Content type B
Content type C
B has a node reference to A.
C has a node reference to B.
I have also 2 roles :
Role 1 is belong to Content type B.
Role 2 is belong to Content type C.
I'm creating a view list in which
1) Content type A (nid) is passed from URL. Filter nodes of type B with nid of type A. ( done with contextual filter )
2) Criteria content type == B ( done with criteria )
3) Join content type C with content type B. ( done with relationship )
I have successfully got a list with above three.
But I have one more thing to do :
If logged-in user is Role 1, I want to filter nodes of type B of the logged-in user.
If logged-in user is administrator, show all nodes of type B which is filtered with node of type A.
How can I do that ? I'm using D7.7
I think filter criteria don't need for user role. It can be done with user filter for content type B. But I can only select all users associated the type
B. I cannot select the current logged-in user id from views filter.
I may need to use this module : http://drupal.org/project/viewsphpfilter
Unfortunately, it has no update for D7.