"Censor" View results/ CCK fields (Censor based on a role) Drupal 6 Nodes + CCK allow the creation of custom fields on nodes and per Role based Permissions to view / edit / delete on a per Field basis. Whilst I don't want to simply "switch off" fields (disable the Permission to View a field based on a Role), I want the field to display "********", or "withheld".

So essentially I want to add additional permissions to the View CCK field, called "View Censored", which doesn't allow them to see the content, but know at least the content exists. In addition, it means that I don't have to have duplicate Views (one with full details, one with some sort of templated *** instead of fields) and the linked Nodes will display, but with censored fields automatically.
The only way I can think of to do this without making two views (which would be my preference to be honest) would be to use the Views Customfield module and use a PHP snippet to check permissions and display the result accordingly.

Create your view as normal and when choosing the field that you wish to change, make sure you check the bock that says "Exclude from display".  Then add a custom PHP field directly after it and use code along these lines:

&lt;?php
  // Check the logged in user
  global $user;
  // Check if the user has a certain role
  if (in_array('USER ROLE', array_values($user-&gt;roles))) {
    print $data-&gt;FIELDNAME;
  }
  else {
    print "Withheld";
  }
?&gt;


Obviously you'll need to replace 'USER ROLE' with the role that you're looking for and you'll need to replace $data-&gt;FIELDNAME with whatever the Views fieldname is, for example $data-&gt;nid or $data-&gt;title.

Otherwise you could use a View with two slightly different block displays, embedded in a contextual Panel that checks for users permissions and displays accordingly.

Edit after asker comment: Craig, a few things. Firstly, I don't think you're approaching the problem correctly at all.  What you want to do is difficult and a  outside of the scope of your question - you asked how to alter a value on a view, not show two different values globally depending on permissions. Before you can get the solution you need to ensure you're tackling the right problem. You simply need to hide a value in two situations depending on a permission, nothing more.  

Secondly, I'm not going to give you another solution as I have given you a perfectly good solution to your question.  This may not be perfect for you but with some initiative you could very easily solve this problem with what I've given you. If you persevere with this information you can use the Content Templates module and the same code as above to hide the value on a node.

Thirdly, never hack modules.  If you want to change the behaviour of a module, write another module to alter it.