Display a (view) block for everyone except one role I have a block which has been generated by a view, and would like to show this block to all users except people who have been granted a particular role, is this possible, and if so how, exactly?

Many thanks in advance.

-Sniper
In the Blocks Admin page, you can use PHP to display/not display the block, so you could put something like this in there:

&lt;?php

global $user;

if (in_array('ROLETHATSHOULDNOTSEETHISBLOCK',array_values($user-&gt;roles))) {
  return FALSE;
} else {
  return TRUE;
}

?&gt;


OR just check all the roles BUT the ROLETHATSHOULDNOTSEETHISBLOCK in the other part of the form :)

ADDITION:

With respect to PHP and security, I presume JoeS is referring to these paragraphs within The Definitive Guide to Drupal 7...

Avoid Using the PHP Filter Module

Although it’s handy to be able to write PHP code directly into your Drupal web interface without having to create a module, it’s also very dangerous! All PHP code should live in the form of modules or themes. Writing PHP in Drupal’s web interface is a bad idea for the following reasons:

• It’s unfriendly to edit and debug (no syntax highlighting and no proper error reporting).

• It makes code reviews difficult and versioning impossible.

• A trusted user might inadvertently damage your site with malformed PHP code.
• If your site was to be compromised, a hacker could penetrate and damage your server using well-crafted PHP code. Keeping the PHP Filter module turned off (or even better, removing it entirely from the filesystem) could help contain such intrusion to the Drupal level only.

• In terms of performance, storing PHP code in the database will prevent any opcode caching mechanism from working on this piece of code

Note that some contributed modules might offer a functionality similar to that of the PHP Filter module; they will suffer from the same flaws noted previously. 

                                   **and**


■ Tip If the PHP Filter module is enabled, try to disable it. PHP Filter module should not be used to provide functionality on node (content) pages. Avoiding that is a good idea from both code quality and deployment perspectives. For placing functionality, rather than content, on a page or part of a page, use Drupal’s hook_menu(), hook_block(), or hook_page_build().

...which refer to the PHP Filter Module, not the admin interface.  This module allows users to enter PHP code into a node directly and I wholeheartedly agree that this opens far too many doors.  

However, in this case, I am talking about using an option given to the administrator of a site by the drupal admin interface, one that hopefully is used by someone with far more PHP experience than casual users of the system.

Furthermore, using this option is most probably a one shot deal and would be properly tested, unlike the Filter option, which would allow a user to change the code at will, opening further doors to mayhem.

In any case, this discussion does highlight the fact that running a drupal site has many facets, security being a large part, and knowledge is key, but all I can hope is that there isn't a security hole that has gone unnoticed for several releases in the admin interface that would allow any code injection into the 6 lines of code suggested here.