From: cajus Date: Fri, 3 Jul 2009 15:25:25 +0000 (+0000) Subject: Avoid empty roles X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=03db0059bf8e4758663e8c6c7c817c75770affd1;p=gosa.git Avoid empty roles git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13884 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-plugins/roleManagement/admin/roleManagement/class_roleGeneric.inc b/gosa-plugins/roleManagement/admin/roleManagement/class_roleGeneric.inc index ee30124ec..58b71a4a5 100644 --- a/gosa-plugins/roleManagement/admin/roleManagement/class_roleGeneric.inc +++ b/gosa-plugins/roleManagement/admin/roleManagement/class_roleGeneric.inc @@ -196,6 +196,11 @@ class roleGeneric extends plugin { $message[]= msgPool::permMove(); } + /* must: cn */ + if ($this->cn == ""){ + $message[]= msgPool::required(_("Name")); + } + // Check if this name is uniq for roles. $ldap= $this->config->get_ldap_link(); $ldap->cd($this->config->current['BASE']); @@ -204,6 +209,7 @@ class roleGeneric extends plugin { if ($ldap->count() != 0 && ( $this->dn == 'new' || $this->cn != $this->orig_cn)){ $message[]= msgPool::duplicated(_("Name")); } + return($message); } diff --git a/gosa-plugins/roleManagement/admin/roleManagement/roleGeneric.tpl b/gosa-plugins/roleManagement/admin/roleManagement/roleGeneric.tpl index 21c683edb..46f5884df 100644 --- a/gosa-plugins/roleManagement/admin/roleManagement/roleGeneric.tpl +++ b/gosa-plugins/roleManagement/admin/roleManagement/roleGeneric.tpl @@ -8,7 +8,7 @@ - +
{t}Name{/t}{t}Name{/t}{$must} {render acl=$cnACL}