From: cajus Date: Tue, 10 Apr 2007 13:55:56 +0000 (+0000) Subject: Fixed problem with samba ctx attributes when acl's are disabled X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=e5e0a770f0f123d7560635c05c282d707521220b;p=gosa.git Fixed problem with samba ctx attributes when acl's are disabled git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@5998 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/Changelog b/Changelog index 75f8281ac..f76fd4bc6 100644 --- a/Changelog +++ b/Changelog @@ -11,6 +11,7 @@ GOsa2 changelog - Fixed month listing in fax reports - february was march - Enabled 9 digits for gid-/uidNumbers - Fixed acl's for saving printers + - Fixed saving of disabled samba acl's * gosa 2.5.9 - Fixed ldap tls connections when schema check was being used diff --git a/plugins/personal/samba/class_sambaAccount.inc b/plugins/personal/samba/class_sambaAccount.inc index 7bfcaf75a..3adfb1d7a 100644 --- a/plugins/personal/samba/class_sambaAccount.inc +++ b/plugins/personal/samba/class_sambaAccount.inc @@ -845,32 +845,42 @@ class sambaAccount extends plugin } /* Save checkbox states. */ - $this->mungedObject->setTsLogin(!isset($_POST['tslogin']) - && chkacl($this->acl, "tslogin") == ""); + if (chkacl($this->acl, "tslogin") == ""){ + $this->mungedObject->setTsLogin(!isset($_POST['tslogin'])); + } // Need to do some index checking to avoid messages like "index ... not found" if(isset($_POST['brokenconn'])) { - $this->mungedObject->setBrokenConn($_POST['brokenconn'] == '1' - && chkacl($this->acl, "brokenconn") == ""); + if (chkacl($this->acl, "brokenconn") == ""){ + $this->mungedObject->setBrokenConn($_POST['brokenconn'] == '1'); + } } if(isset($_POST['reconn'])) { - $this->mungedObject->setReConn($_POST['reconn'] == '1' - && chkacl($this->acl, "reconn") == ""); + if (chkacl($this->acl, "reconn") == ""){ + $this->mungedObject->setReConn($_POST['reconn'] == '1'); + } + } + if (chkacl($this->acl, "inherit") == "") { + $this->mungedObject->setInheritMode(isset($_POST['inherit'])); + } + if (chkacl($this->acl, "CtxMaxConnectionTime") == "") { + $this->mungedObject->setCtxMaxConnectionTimeF(!isset($_POST['CtxMaxConnectionTimeF'])); + } + if (chkacl($this->acl, "CtxMaxDisconnectionTime") == ""){ + $this->mungedObject->setCtxMaxDisconnectionTimeF( + !isset($_POST['CtxMaxDisconnectionTimeF'])); + } + if (chkacl($this->acl, "CtxMaxIdleTime") == ""){ + $this->mungedObject->setCtxMaxIdleTimeF(!isset($_POST['CtxMaxIdleTimeF'])); + } + if (chkacl($this->acl, "connectclientdrives") == ""){ + $this->mungedObject->setConnectClientDrives(isset($_POST['connectclientdrives'])); + } + if (chkacl($this->acl, "connectclientprinters") == ""){ + $this->mungedObject->setConnectClientPrinters(isset($_POST['connectclientprinters'])); + } + if (chkacl($this->acl, "defaultprinter") == ""){ + $this->mungedObject->setDefaultPrinter(isset($_POST['defaultprinter'])); } - $this->mungedObject->setInheritMode(isset($_POST['inherit']) - && chkacl($this->acl, "inherit") == ""); - $this->mungedObject->setCtxMaxConnectionTimeF(!isset($_POST['CtxMaxConnectionTimeF']) - && chkacl($this->acl, "CtxMaxConnectionTime") == ""); - $this->mungedObject->setCtxMaxDisconnectionTimeF( - !isset($_POST['CtxMaxDisconnectionTimeF']) - && chkacl($this->acl, "CtxMaxDisconnectionTime") == ""); - $this->mungedObject->setCtxMaxIdleTimeF(!isset($_POST['CtxMaxIdleTimeF']) - && chkacl($this->acl, "CtxMaxIdleTime") == ""); - $this->mungedObject->setConnectClientDrives(isset($_POST['connectclientdrives']) - && chkacl($this->acl, "connectclientdrives") == ""); - $this->mungedObject->setConnectClientPrinters(isset($_POST['connectclientprinters']) - && chkacl($this->acl, "connectclientprinters") == ""); - $this->mungedObject->setDefaultPrinter(isset($_POST['defaultprinter']) - && chkacl($this->acl, "defaultprinter") == ""); /* Save combo boxes. Takes two values */ if(isset($_POST['reconn'])) { diff --git a/plugins/personal/samba/samba3.tpl b/plugins/personal/samba/samba3.tpl index 30d0a1a33..a7ae390e3 100644 --- a/plugins/personal/samba/samba3.tpl +++ b/plugins/personal/samba/samba3.tpl @@ -133,6 +133,8 @@