How to theme nodes in views based on the author's role? I have a view listing all recent blog posts that have been published on the website.
These blog posts can be created either by regular authentified users or by staff members.

I need nodes published by staff members to be themed differentely to be highlighted.
Luckily, Views allows you to add custom row classes through its admin interface, so you can style your view rows according to any field in that row.

Here is what I'd do, in your case, to add a 'staff-author' or 'user-author' class to your view row, depending on who wrote the blog (I'm just assuming those are the roles associated with your two user groups - they may be something else ;-)).  Once you've added such a class, you can add css in your custom theme to style those differently.


Add a 'user' relationship to your blog view.  Under the "Advanced" section of your view, add the following relationship: "User: Content authored".  Now you'll be able to add fields from the node author to your view (even if you don't display them)
Now you can add the 'User: Roles' field to your view - just make sure to select to use the User relationship you've added when configuring the field. You can check to not have it display too!





Finally, now you can edit your format settings to fill in a custom css class, based on any field you choose (from the 'Replacement Pattern' options for your view).  In your case, it would be [rid-role].






Now, inspect the html of your view using Firebug (or something similar), and your view rows should have the new css class filled in, depending on the role of the node author.  Use that to style the entries differently!