From 5f9cc66e9b9a37e62621851b28c0eb9075e370aa Mon Sep 17 00:00:00 2001 From: cajus Date: Fri, 7 Mar 2008 15:54:35 +0000 Subject: [PATCH] removed show_errors git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9450 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/contrib/openldap/slapd.conf | 22 +------------------ gosa-core/html/password.php | 4 ++-- gosa-core/include/functions.inc | 17 -------------- .../plugins/admin/acl/class_aclManagement.inc | 2 +- .../class_departmentManagement.inc | 2 +- .../admin/groups/class_groupManagement.inc | 2 +- .../admin/ogroups/class_ogroupManagement.inc | 2 +- .../admin/users/class_userManagement.inc | 8 +++---- gosa-core/plugins/personal/generic/main.inc | 4 ++-- gosa-core/plugins/personal/posix/main.inc | 2 +- 10 files changed, 14 insertions(+), 51 deletions(-) diff --git a/gosa-core/contrib/openldap/slapd.conf b/gosa-core/contrib/openldap/slapd.conf index ba0c98680..afb48de04 100644 --- a/gosa-core/contrib/openldap/slapd.conf +++ b/gosa-core/contrib/openldap/slapd.conf @@ -14,7 +14,7 @@ include /etc/ldap/schema/inetorgperson.schema include /etc/ldap/schema/openldap.schema include /etc/ldap/schema/nis.schema include /etc/ldap/schema/misc.schema -include /etc/ldap/schema/trust.schema +include /etc/ldap/schema/trust.schema #include /etc/ldap/schema/krb5-kdc.schema # These should be present for GOsa. In case of samba3, @@ -60,7 +60,6 @@ password-hash {CRYPT} # Search base defaultsearchbase dc=gonicus,dc=de - # Where clients are refered to if no # match is found locally #referral ldap://some.other.ldap.server @@ -125,7 +124,6 @@ access to dn.subtree=cn=Monitor # Others should not be able to see it, except the admin # entry below access to attrs=userPassword,sambaPwdLastSet,sambaPwdMustChange,sambaPwdCanChange,shadowMax,shadowExpire - by dn="cn=ldapadmin,dc=gonicus,dc=de" write by dn.regex="uid=[^/]+/admin\+(realm=GONICUS.LOCAL)?" write by anonymous auth by self write @@ -134,15 +132,12 @@ access to attrs=userPassword,sambaPwdLastSet,sambaPwdMustChange,sambaPwdCanChang # Deny access to imap/fax/kerberos admin passwords stored # in ldap tree access to attrs=goImapPassword - by dn="cn=ldapadmin,dc=gonicus,dc=de" write by dn.regex="uid=[^/]+/admin\+(realm=GONICUS.LOCAL)?" write by * none access to attrs=goKrbPassword - by dn="cn=ldapadmin,dc=gonicus,dc=de" write by dn.regex="uid=[^/]+/admin\+(realm=GONICUS.LOCAL)?" write by * none access to attrs=goFaxPassword - by dn="cn=ldapadmin,dc=gonicus,dc=de" write by dn.regex="uid=[^/]+/admin\+(realm=GONICUS.LOCAL)?" write by * none @@ -155,25 +150,11 @@ access to attrs=gotoLastUser # Others should not be able to see it, except the # admin entry below access to attrs=sambaLmPassword,sambaNtPassword - by dn="cn=ldapadmin,dc=gonicus,dc=de" write by dn.regex="uid=[^/]+/admin\+(realm=GONICUS.LOCAL)?" write by anonymous auth by self write by * none -# Enable write create access for the terminal admin -access to dn="ou=incoming,dc=gonicus,dc=de" - by dn="cn=terminal-admin,dc=gonicus,dc=de" write - by dn="cn=ldapadmin,dc=gonicus,dc=de" write - by dn.regex="uid=[^/]+/admin\+(realm=GONICUS.LOCAL)?" write - by * none - -access to dn.sub="ou=incoming,dc=gonicus,dc=de" - by dn="cn=terminal-admin,dc=gonicus,dc=de" write - by dn="cn=ldapadmin,dc=gonicus,dc=de" write - by dn.regex="uid=[^/]+/admin\+(realm=GONICUS.LOCAL)?" write - by * none - # What trees should be readable, depends on your policy. Either # use this entry and specify what should be readable, or leave # the access to * => by * read below untouched @@ -182,7 +163,6 @@ access to dn.sub="ou=incoming,dc=gonicus,dc=de" # The admin dn has full write access access to * - by dn="cn=ldapadmin,dc=gonicus,dc=de" =wrscx by dn.regex="uid=[^/]+/admin\+(realm=GONICUS.LOCAL)?" =wrscx by * read # by peername="ip=127\.0\.0\.1" read diff --git a/gosa-core/html/password.php b/gosa-core/html/password.php index 5bef30f72..1391d03a7 100644 --- a/gosa-core/html/password.php +++ b/gosa-core/html/password.php @@ -237,7 +237,7 @@ if ($_SERVER["REQUEST_METHOD"] == "POST" && isset($_POST['apply'])){ /* Do we need to show error messages? */ if (count ($message) != 0){ /* Show error message and continue editing */ - show_errors($message); + msgDialog::displayChecks($message); } else { /* Passed quality check, just try to change the password now */ @@ -251,7 +251,7 @@ if ($_SERVER["REQUEST_METHOD"] == "POST" && isset($_POST['apply'])){ } if ($output != ""){ $message[]= _("External password changer reported a problem: ".$output); - show_errors($message); + msgDialog::displayChecks($message); } else { if ($method != ""){ change_password ($ui->dn, $_POST['new_password'], 0, $method); diff --git a/gosa-core/include/functions.inc b/gosa-core/include/functions.inc index 972281137..f27171e8d 100644 --- a/gosa-core/include/functions.inc +++ b/gosa-core/include/functions.inc @@ -1357,23 +1357,6 @@ function get_printer_list() } -function show_ldap_error($message, $addon= "") -{ - if (!preg_match("/Success/i", $message)){ - if ($addon == ""){ - msg_dialog::display(_("LDAP error:"), $message, ERROR_DIALOG); - } else { - if(!preg_match("/No such object/i",$message)){ - msg_dialog::display(_("LDAP error"), sprintf(_("Plugin '%s':%s"),"".$addon."", "

$message"),ERROR_DIALOG); - } - } - return TRUE; - } else { - return FALSE; - } -} - - function rewrite($s) { global $REWRITE; diff --git a/gosa-core/plugins/admin/acl/class_aclManagement.inc b/gosa-core/plugins/admin/acl/class_aclManagement.inc index 80c82530d..b6f97d368 100644 --- a/gosa-core/plugins/admin/acl/class_aclManagement.inc +++ b/gosa-core/plugins/admin/acl/class_aclManagement.inc @@ -395,7 +395,7 @@ class aclManagement extends plugin } else { /* Ok. There seem to be errors regarding to the tab data, show message and continue as usual. */ - show_errors($message); + msgDialog::displayChecks($message); } } diff --git a/gosa-core/plugins/admin/departments/class_departmentManagement.inc b/gosa-core/plugins/admin/departments/class_departmentManagement.inc index effbb5717..74d153078 100644 --- a/gosa-core/plugins/admin/departments/class_departmentManagement.inc +++ b/gosa-core/plugins/admin/departments/class_departmentManagement.inc @@ -317,7 +317,7 @@ class departmentManagement extends plugin } else { /* Ok. There seem to be errors regarding to the tab data, show message and continue as usual. */ - show_errors($message); + msgDialog::displayChecks($message); } } diff --git a/gosa-core/plugins/admin/groups/class_groupManagement.inc b/gosa-core/plugins/admin/groups/class_groupManagement.inc index 6b64a03eb..23b264a97 100644 --- a/gosa-core/plugins/admin/groups/class_groupManagement.inc +++ b/gosa-core/plugins/admin/groups/class_groupManagement.inc @@ -270,7 +270,7 @@ class groupManagement extends plugin } else { /* Ok. There seem to be errors regarding to the tab data, show message and continue as usual. */ - show_errors($message); + msgDialog::displayChecks($message); } } diff --git a/gosa-core/plugins/admin/ogroups/class_ogroupManagement.inc b/gosa-core/plugins/admin/ogroups/class_ogroupManagement.inc index 07fcbeff7..67d092a38 100644 --- a/gosa-core/plugins/admin/ogroups/class_ogroupManagement.inc +++ b/gosa-core/plugins/admin/ogroups/class_ogroupManagement.inc @@ -421,7 +421,7 @@ class ogroupManagement extends plugin } else { /* Ok. There seem to be errors regarding to the tab data, show message and continue as usual. */ - show_errors($message); + msgDialog::displayChecks($message); } } diff --git a/gosa-core/plugins/admin/users/class_userManagement.inc b/gosa-core/plugins/admin/users/class_userManagement.inc index 9b695c8a7..1dfb05833 100644 --- a/gosa-core/plugins/admin/users/class_userManagement.inc +++ b/gosa-core/plugins/admin/users/class_userManagement.inc @@ -251,7 +251,7 @@ class userManagement extends plugin if (count($message) != 0){ /* Show error message and continue editing */ - show_errors ($message); + msgDialog::displayChecks($message); return($smarty->fetch(get_template_path('password.tpl', TRUE))); } @@ -679,7 +679,7 @@ class userManagement extends plugin } else { /* Ok. There seem to be errors regarding to the tab data, show message and continue as usual. */ - show_errors($message); + msgDialog::displayChecks($message); } } @@ -743,7 +743,7 @@ class userManagement extends plugin /* Show error message / continue editing */ if (count($message) > 0){ - show_errors ($message); + msgDialog::displayChecks($message); foreach(array("sn", "givenName", "uid", "template") as $attr){ if(isset($_POST[$attr])){ @@ -830,7 +830,7 @@ class userManagement extends plugin /* Show error message / continue editing */ if (count($message) > 0){ - show_errors ($message); + msgDialog::displayChecks($message); } else { $attributes= array('sn' => $this->sn, 'givenName' => $this->givenName); if (isset($this->config->current['IDGEN']) && diff --git a/gosa-core/plugins/personal/generic/main.inc b/gosa-core/plugins/personal/generic/main.inc index 382e958b1..fbfcb823e 100644 --- a/gosa-core/plugins/personal/generic/main.inc +++ b/gosa-core/plugins/personal/generic/main.inc @@ -91,7 +91,7 @@ if (!$remove_lock){ if (count($message) != 0){ /* Show error message and continue editing */ - show_errors ($message); + msgDialog::displayChecks($message); $display.= $smarty->fetch(get_template_path('password.tpl', TRUE)); return ($display); } @@ -133,7 +133,7 @@ if (!$remove_lock){ } else { /* Errors found, show message */ - show_errors ($message); + msgDialog::displayChecks($message); } } diff --git a/gosa-core/plugins/personal/posix/main.inc b/gosa-core/plugins/personal/posix/main.inc index a234b4b46..4aedfd346 100644 --- a/gosa-core/plugins/personal/posix/main.inc +++ b/gosa-core/plugins/personal/posix/main.inc @@ -82,7 +82,7 @@ if (!$remove_lock){ session::un_set ('posixAccount'); } else { /* Errors found, show message */ - show_errors ($message); + msgDialog::displayChecks($message); } } -- 2.30.2