If I create some role named in Ukranian or Russian language ( UTF-8 codepage ), then Permissions page does not display such roles.
Tested on Windows apache 1.3, and on CentOS apache 2.

Comments

jaypan’s picture

I have discovered the same problem. What happens is that on non-english sites, on the permissions page, these are the only two options:

assign role
assign all roles

The reason for this is in this code:

<?php
function _role_delegation_make_perm($role) {
  // Allow alphanumerics, space, hyphen, underscore.
  $role = preg_replace('/[^a-zA-Z0-9 \\-_]/', '', $role);
  return "assign $role role";
}
?>

The preg_replace function is replacing all roles that use non-English characters (in the OP's case, Russian, in my case, Japanese). I'm not to sure what the reason behind the preg_replace is, but I have found that by removing that line of code, the module works fine in other languages.

David Lesieur’s picture

Status: Active » Fixed

I think the preg_replace() was a leftover from Drupal 5, which had limitations on role names. Fixed!

To complete the upgrade, it will be necessary to run update.php in order to preserve the role delegation permissions.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.