My subject line is a tad incomplete... Here is what I am trying to accomplish:

I have a set up my drupal site where I produce materials for specific clients that I want visible only to those clients.

I have created roles for each client
I assign users to their respective client role
I have created several content types one being a "Client Services Activity Report" which details work completed for a specific client and where I designate the role that can view the content.

All of the above can easily be designed into a view. Here is the tricky part:

I have a single page running panels where I want data displayed based on the user and role of the user that is logged in. In other words all my clients visit the same page to view their "client specific data" but the content presented on the page is rendered based on the user and the role they are assigned to. The key here is that I don't want to have to edit the view each time I add a client (role) and users. I want the view to pick up the user's role.

There has to be an easy way to do this, but I have not found it. I guess in short form I am looking for the equivalent of "Filter: Current User = Yes" that currently exists out of the box to filter content for a specific user, but I need the same functionality for a role... something like "Filter: Current Role = User's Role(s)".

Put another way I need Drupal to pick up the users role dynamically based on the logged in user so that all the users of a specific role can see the same info as the other members, but the page is rendered based on the logged in user rather than having to create individual views for each client that specifies the role specifically.... I want to simply create the content, assign it to a role and have the data render based on the user who is logged in and their role....

Wow, this is hard to explain. I hope that it makes sense.... :)

THANKS IN ADVANCE!

Comments

fresh-off’s picture

rather similar myself. have you come up with any solutions?

rdentry’s picture

I am pretty much trying to do the same thing. One view showing content based on the user that is logged in. I'm wondering if you can use Node Access along with the view to get this working. What I imagine is when creating a node, there would be a drop down of users and/or roles. You can select more than one user/role if necessary. Then when that user and/or role logs in and navigates to the view, only nodes that have that user/role selected from the dropdown will be shown. Let me know if you have any ideas, or if what I am thinking has nothing to do with what you're trying to do.

WorldFallz’s picture

you should be able to do this with the http://drupal.org/project/viewsphpfilter module.