Revoke permissions from a user role.
$rid: The ID of a user role to alter.
$permissions: A list of permission names to revoke.
user_role_change_permissions()
function user_role_revoke_permissions($rid, array $permissions = array()) {
// Revoke permissions for the role.
db_delete('role_permission')
->condition('rid', $rid)
->condition('permission', $permissions, 'IN')
->execute();
// Clear the user access cache.
drupal_static_reset('user_access');
drupal_static_reset('user_role_permissions');
}