0

I have a View that is using the Table format to show all users who have uploaded content under a particular node. This view will be visible to anyone in the Authenticated User role. Users in Administrator role (about 4 users) also contribute to this, but I don't want their details to be visible to anyone else in the table. This is not intended to be an exposed filter.

So basically, if the current logged in user is in the Authenticated User role, then he should not see the admins.

If the current logged in user is in the Administrator role, then he should see everyone.

Possible? Thank you

1

by the sounds of it, you're looking for Views Conditional module:

Views Conditional is a simple module that allows you to define conditionals (if xxx then yyy) with fields in views. Conditions include:

 Equal To
 Not Equal To
 Greater Than
 Less Than
 Empty
 Not Empty

Views conditional allows you to output text based on the result of the condition.

  • Hi Geoff. Thanks! I've used Views Conditional on previous projects, and my experience with it is that it works more on individual Fields. I need rather to filter out a complete row in a table (comprised of fields) – maGz Aug 26 '14 at 0:18
  • ahh, I see. one alternative is to clone the view, making one accessible to Admins and the other to authenticated users, then you can choose what elements are displayed and in what format for each role – Geoff Aug 26 '14 at 0:24
  • Yeah, that's what I thought of doing actually. trying to avoid that as I'm sure there must be a way to accomplish this. – maGz Aug 26 '14 at 0:37
  • my only other suggestion would be to use a views preprocessor and filter the values manually by code based on the current uID... – Geoff Aug 26 '14 at 1:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.