Roles named not-in-English does not displayed on permissions page.
galser - July 4, 2009 - 12:53
| Project: | Role Delegation |
| Version: | 6.x-1.x-dev |
| Component: | User interface |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
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.

#1
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:
<?phpfunction _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.