summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: fa4d666)
raw | patch | inline | side by side (parent: fa4d666)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 6 Dec 2006 07:20:01 +0000 (07:20 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 6 Dec 2006 07:20:01 +0000 (07:20 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@5316 594d385d-05f5-0310-b6e9-bd551577e9d8
diff --git a/plugins/admin/systems/class_componentGeneric.inc b/plugins/admin/systems/class_componentGeneric.inc
index d05af5d6688623e5d42fd4b5f1ab8b433b013b2b..2e6f7029814a0d49e6628220ee64de668b5fb49d 100644 (file)
foreach($_POST as $name => $value){
if(preg_match("/^chooseBase/",$name) && $once){
$once = false;
- $this->dialog = new baseSelectDialog($this->config,$this);
+ $this->dialog = new baseSelectDialog($this->config,$this,$this->get_allowed_bases());
$this->dialog->setCurrentBase($this->base);
}
}
}
}
- /* Set new acl base */
- if($this->dn == "new") {
- $this->set_acl_base($this->base);
- }
-
- $ui= get_userinfo();
- if ($this->dn == "new" && !$this->acl_is_createable()){
- $message[]= _("You have no permissions to create a component on this 'Base'.");
- }
-
if ($this->orig_dn != $this->dn){
$ldap= $this->config->get_ldap_link();
$ldap->cd ($this->base);
diff --git a/plugins/admin/systems/class_phoneGeneric.inc b/plugins/admin/systems/class_phoneGeneric.inc
index 4b6150907e36730c139f50a84ead3af7cb087a43..928b7e317ee5aae18aa5fac9d80ea0e8a4008e96 100644 (file)
foreach($_POST as $name => $value){
if(preg_match("/^chooseBase/",$name) && $once){
$once = false;
- $this->dialog = new baseSelectDialog($this->config,$this);
+ $this->dialog = new baseSelectDialog($this->config,$this,$this->get_allowed_bases());
$this->dialog->setCurrentBase($this->base);
}
}
$message[]= _("The 'Phone name' '0' is reserved and cannot be used.");
}
- /* Set new acl base */
- if($this->dn == "new") {
- $this->set_acl_base($this->base);
- }
-
- $ui= get_userinfo();
- if ($this->dn == "new" && $this->acl_is_createable()){
- $message[]= _("You have no permissions to create a phone on this 'Base'.");
- }
-
if ($this->orig_dn != $this->dn){
$ldap= $this->config->get_ldap_link();
$ldap->cd ($this->base);
diff --git a/plugins/admin/systems/class_printGeneric.inc b/plugins/admin/systems/class_printGeneric.inc
index 7b55b0ed4d8475746fbc0120eb0f1d74bcfc3755..9457f8e029ecf9c302cc4dd42476639aadd466f9 100644 (file)
$message[]= "The required field 'Printer name' is not set.";
}
- /* Set new acl base */
- if($this->dn == "new") {
- $this->set_acl_base($this->base);
- }
-
- if(preg_match("/printer/i",$this->BelongsTo)){
- if ($this->orig_dn == "new" && !$this->acl_is_createable()){
- $message[]= _("You have no permissions to create a group on this 'Base'.");
- }
- }
-
/* must: labeledURI */
if(empty($this->labeledURI)){
$message[]= "The required field 'Printer URL' is not set.";
diff --git a/plugins/admin/systems/class_servGeneric.inc b/plugins/admin/systems/class_servGeneric.inc
index a840bca11218f1b620feb68aca70fad1fc6abe88..527f56bd8b9cc078e7e63bbd33630f83314f55e1 100644 (file)
$message[]= _("The required field 'Server name' is not set.");
}
- /* Set new acl base */
- if($this->dn == "new") {
- $this->set_acl_base($this->base);
- }
-
- $ui= get_userinfo();
- if (!$this->acl_is_createable() && $this->dn == "new"){
- $message[]= _("You have no permissions to create a server on this 'Base'.");
- }
-
if ($this->orig_dn != $this->dn){
$ldap= $this->config->get_ldap_link();
$ldap->cd ($this->base);
while ($attrs= $ldap->fetch()){
if ($attrs['dn'] != $this->orig_dn){
if(!preg_match("/,ou=incoming,/",$attrs['dn'])){
- $message[]= sprintf (_("There is already an entry '%s' in the base choosen by you"), $this->cn);
- break;
+ $message[]= sprintf (_("There is already an entry '%s' in the base choosen by you"), $this->cn);
+ break;
}
}
}
diff --git a/plugins/admin/systems/class_terminalGeneric.inc b/plugins/admin/systems/class_terminalGeneric.inc
index b82f778be77766ce939f6e96356be17cc62f1377..ca138cc72272400157fac43ec1929d7e0e2f9eba 100644 (file)
/* Permissions for that base? */
$this->dn= "cn=".$this->cn.",ou=terminals,ou=systems,".$this->base;
- /* Set new acl base */
- if($this->dn == "new") {
- $this->set_acl_base($this->base);
- }
-
- $ui= get_userinfo();
- if ($this->dn == "new" && !$this->acl_is_createable()){
- $message[]= _("You have no permissions to create a terminal on this 'Base'.");
- }
-
if ($this->cn == ""){
$message[]= _("The required field 'Terminal name' is not set.");
}
diff --git a/plugins/admin/systems/class_workstationGeneric.inc b/plugins/admin/systems/class_workstationGeneric.inc
index 7a4bbe8959026a9f7726144d7c0d1be1ee7b830d..0330d015e3443af3949ddf272230a2ca545aad1f 100644 (file)
if($this->dialog->isClosed()){
$this->dialog = false;
}elseif($this->dialog->isSelected()){
- $this->base = $this->dialog->isSelected();
/* A new base was selected, check if it is a valid one */
$tmp = $this->get_allowed_bases();
$this->dn= "cn=".$this->cn.",ou=workstations,ou=systems,".$this->base;
- /* Set new acl base */
- if($this->dn == "new") {
- $this->set_acl_base($this->base);
- }
-
- if ($this->orig_dn == "new" && !$this->acl_is_createable()){
- $message[]= _("You have no permissions to create a workstation on this 'Base'.");
- }
-
-
if ($this->cn == ""){
$message[]= _("The required field 'Workstation name' is not set.");
}