summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e698adf)
raw | patch | inline | side by side (parent: e698adf)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 29 Jul 2010 11:23:11 +0000 (11:23 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 29 Jul 2010 11:23:11 +0000 (11:23 +0000) |
-Allow special chars in role names
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19218 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19218 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/rolemanagement/admin/roleManagement/class_roleGeneric.inc | patch | blob | history | |
gosa-plugins/rolemanagement/admin/roleManagement/tabs_roles.inc | patch | blob | history |
diff --git a/gosa-plugins/rolemanagement/admin/roleManagement/class_roleGeneric.inc b/gosa-plugins/rolemanagement/admin/roleManagement/class_roleGeneric.inc
index 21190175401050560e9e297a15678ee38586bddf..a06f6600d9ed818d376511b8c0a60e1ee428875b 100644 (file)
$message[]= msgPool::required(_("Name"));
}
-
- if (preg_match("/[^a-z0-9]/i", $this->cn)){
- $message[]= msgPool::invalid(_("Name"), $this->cn, '/[a-z0-9]/i');
+ if (preg_match ('/[#+:=>\\\\\/]/', $this->ou)){
+ $message[]= msgPool::invalid(_("Name"), $this->cn, "/[^#+:=>\\\\\/]/");
}
// Check if this name is uniq for roles.
diff --git a/gosa-plugins/rolemanagement/admin/roleManagement/tabs_roles.inc b/gosa-plugins/rolemanagement/admin/roleManagement/tabs_roles.inc
index 98b3c00c38a6fa798b788d1df42a8cc75812d4dd..8346d9b1b55d226034ad499fbd75f95bf94d39d1 100644 (file)
/* Check for new 'dn', in order to propagate the
'dn' to all plugins */
- $new_dn= 'cn='.$baseobject->cn.','.get_ou("roleGeneric", "roleRDN").$baseobject->base;
+ $nAV = preg_replace('/,/', '\,', $baseobject->cn);
+ $nAV = preg_replace('/"/', '\"', $nAV);
+ $new_dn= 'cn='.$nAV.','.get_ou("roleGeneric", "roleRDN").$baseobject->base;
/* Move role? */
if ($this->dn != $new_dn){