Code

Fixed ACL management for phoneAccount
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 30 Nov 2005 09:32:37 +0000 (09:32 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 30 Nov 2005 09:32:37 +0000 (09:32 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2149 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/gofon/phoneaccount/class_phoneAccount.inc
plugins/gofon/phoneaccount/generic.tpl
plugins/gofon/phoneaccount/main.inc

index ab1a47101623df0414da6dd87f5d53120f49ce21..4610285fb50e38922704978349cd035b99cb2124 100644 (file)
@@ -781,7 +781,7 @@ class phoneAccount extends plugin
 
     /* Transfer ACL's */
     foreach($this->attributes as $val){
-      $smarty->assign($val."ACL", chkacl($this->acl, "$val"));
+      $smarty->assign($val."ACL", chkacl($this->acl,$val));
       if(isset($this->$val)){
         $smarty->assign($val,$this->$val);
       }else{
index dce10b4d32f9ced0541acd1b6e01fc5c93d8d25b..cffc65744b2e28733b57f5dd5e357069de8f42d6 100644 (file)
@@ -60,7 +60,7 @@
                <table summary="{t}Phone macro{/t}">
                        <tr>
                                <td colspan=2>
-                                        <select name="macro" onchange="document.mainform.submit()" {$telephoneNumberACL}>
+                                        <select name="macro" onchange="document.mainform.submit()" {$goFonMacroACL}>
                                           {html_options options=$macros selected=$macro}
                                <option disabled>&nbsp;</option>
                                         </select>
index 19bc2be7840516f0061a911a32099af0fd76b101..cc27bee55da540166cdbc2e87aef59b7d35e34ee 100644 (file)
@@ -62,7 +62,7 @@ if (!$remove_lock){
        } else {
                $acl= get_permissions ($ui->dn, $ui->subtreeACL);
                $editacl= get_module_permission($acl, "phoneAccount", $ui->dn);
-               $phoneAccount->acl= "#none#";
+               $phoneAccount->acl="#none#"; 
        }
 
        /* save changes to LDAP and disable edit mode */
@@ -74,12 +74,13 @@ if (!$remove_lock){
                /* No errors, save object */
                if (count ($message) == 0){
                        $phoneAccount->save ();
+
+                       $phoneAccount->acl="#none#"; 
                        gosa_log ("User/phone object'".$ui->dn."' has been saved");
-                       $phoneAccount->acl= "#none#";
                        del_lock ($ui->dn);
                        sess_del ('edit');
 
-                        /* Write back to session */
+                       /* Write back to session */
                        $_SESSION['phoneAccount']= $phoneAccount;
                } else {
                        /* Errors found, show message */