Commit 7db5ef45 authored by Côme Bernigaud's avatar Côme Bernigaud Committed by Benoit Mortier
Browse files

Fixes #3150 Forbidding used FAI class names for FAI profiles

parent 4d1bc6f2
......@@ -412,6 +412,12 @@ class faiProfile extends faiPluginClass
if($this->cn == ""){
$message[]= msgPool::required(_("Name"));
} elseif (empty($message)) {
/* Profile can't use a name used by a class */
$res = FAI::get_all_objects_for_given_base($this->parent->parent->fai_release, "(cn=".$this->cn.")");
if (!empty($res)) {
$message[] = _("You can't use the same name for a class and a profile!");
return $message;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment