From ee69951dbe62dc23e175a4052a83ccd1db0c39f9 Mon Sep 17 00:00:00 2001 From: cajus Date: Thu, 1 Oct 2009 12:01:59 +0000 Subject: [PATCH] Added missing classes git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14436 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../admin/departments/class_domain.inc | 95 +++++++++++++++++++ .../plugins/admin/departments/domain.tpl | 57 +++++++++++ 2 files changed, 152 insertions(+) create mode 100644 gosa-core/plugins/admin/departments/class_domain.inc create mode 100644 gosa-core/plugins/admin/departments/domain.tpl diff --git a/gosa-core/plugins/admin/departments/class_domain.inc b/gosa-core/plugins/admin/departments/class_domain.inc new file mode 100644 index 000000000..04fa3a4c9 --- /dev/null +++ b/gosa-core/plugins/admin/departments/class_domain.inc @@ -0,0 +1,95 @@ +config->get_ldap_link(); + $ldap->ls ("(&(dc=".$this->dc.")(objectClass=domain))", $this->base, array('dn')); + if ($this->orig_dc == "new" && $ldap->count()){ + $message[]= msgPool::duplicated(_("Name")); + } elseif ($this->orig_dn != $this->dn && $ldap->count()){ + $message[]= msgPool::duplicated(_("Name")); + } + + /* All required fields are set? */ + if ($this->dc == ""){ + $message[]= msgPool::required(_("Name")); + }elseif(tests::is_department_name_reserved($this->dc,$this->base)){ + $message[]= msgPool::reserved(_("Name")); + }elseif(!preg_match ('/[a-z0-9 \.,\-_]/i', $this->dc)){ + $message[]= msgPool::invalid(_("Name"), $this->dc, "/[a-z0-9 \.,\-_]/"); + } + + /* Check description */ + if ($this->description == ""){ + $message[]= msgPool::required(_("Description")); + } + + /* Check if we are allowed to create or move this object + */ + if($this->orig_dn == "new" && !$this->acl_is_createable($this->base)){ + $message[] = msgPool::permCreate(); + }elseif($this->orig_dn != "new" && $this->base != $this->orig_base && !$this->acl_is_moveable($this->base)){ + $message[] = msgPool::permMove(); + } + + return($message); + } + + + /* Return plugin informations for acl handling */ + static function plInfo() + { + return (array("plShortName" => _("Domain Component"), + "plDescription" => _("Domain Component"), + "plSelfModify" => FALSE, + "plPriority" => 4, + "plDepends" => array(), + "plSection" => array("administration"), + "plCategory" => array("department"), + + "plProvidedAcls" => array( + "dc" => _("Name"), + "description" => _("Description"), + "base" => _("Base"), + "gosaUnitTag" => _("Administrative settings")) + )); + } +} + +// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: +?> diff --git a/gosa-core/plugins/admin/departments/domain.tpl b/gosa-core/plugins/admin/departments/domain.tpl new file mode 100644 index 000000000..5910edc77 --- /dev/null +++ b/gosa-core/plugins/admin/departments/domain.tpl @@ -0,0 +1,57 @@ + + + + + + +
+

{t}Properties{/t}

+ + + + + + + + + + {if !$is_root_dse} + + + + + {/if} +
{$must} +{render acl=$dcACL} + +{/render} +
{$must} +{render acl=$descriptionACL} + +{/render} +
{$must} +{render acl=$baseACL} + +{/render} + +{render acl=$baseACL disable_picture='images/lists/folder_grey.png'} + +{/render} +
+
+

 

+ + + + +
+

{t}Administrative settings{/t}

+{render acl=$gosaUnitTagACL} + +{/render} +
+ -- 2.30.2