Code

ACL updates and fixes part 1
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 13 Dec 2006 09:16:31 +0000 (09:16 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 13 Dec 2006 09:16:31 +0000 (09:16 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@5374 594d385d-05f5-0310-b6e9-bd551577e9d8

20 files changed:
html/main.php
ihtml/themes/default/acl.tpl
include/class_acl.inc
plugins/personal/connectivity/class_intranetAccount.inc
plugins/personal/connectivity/class_kolabAccount.inc
plugins/personal/connectivity/class_opengwAccount.inc
plugins/personal/connectivity/class_oxchangeAccount.inc
plugins/personal/connectivity/class_phpgwAccount.inc
plugins/personal/connectivity/class_phpscheduleitAccount.inc
plugins/personal/connectivity/class_pptpAccount.inc
plugins/personal/connectivity/class_proxyAccount.inc
plugins/personal/connectivity/class_pureftpdAccount.inc
plugins/personal/connectivity/class_webdavAccount.inc
plugins/personal/environment/class_environment.inc
plugins/personal/mail/class_mailAccount.inc
plugins/personal/nagios/class_nagiosAccount.inc
plugins/personal/netatalk/class_netatalk.inc
plugins/personal/password/class_password.inc
plugins/personal/posix/class_posixAccount.inc
plugins/personal/samba/class_sambaAccount.inc

index d84fda331847e797f74e601bd013262207e99078..478fd0f00ae227350151462d5b8bf1c15f8344ef 100644 (file)
@@ -380,7 +380,7 @@ print_red(NULL);
 /* Second part of browser 'back button used' check */
 $_SESSION['back_button_test'] ++;
 $bb = "<input type='hidden' name='back_button_test' value='".$_SESSION['back_button_test']."'>";
-$smarty->assign("contents", $bb.$display.get_MicroTimeDiff($start,microtime()));
+$smarty->assign("contents", $bb.$display);
 
 /* Assign erros to smarty */
 if (isset($_SESSION['errors'])){
@@ -412,22 +412,8 @@ echo $display;
 $_SESSION['plist']= $plist;
 $_SESSION['config']= $config;
 
-/* Echo compilation time * /
-$r = split(" ",$start);
-$ms = $r[0];
-$s= $r[1];
+/* Echo compilation time */
+//echo "<p align='right'>".get_MicroTimeDiff($start,microtime())."</p>";
 
-$re = split(" ",microtime());
-$mse = $re[0];
-$se= $re[1];
-
-$add = 0;
-if(($mse -$ms)<0){
-  $se --;
-  $add = 1;
-}
-echo ($se -$s).",";
-echo (int)(($add+($mse -$ms))*1000)." s";
-*/
 // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
 ?>
index 84a108ceac1474b3b7f951c92dce6c03de9b1ca9..5df67938314d2801d416ee9b581f63079a473c3c 100644 (file)
@@ -5,7 +5,7 @@
 {/if}
 
 {if $dialogState eq 'create'}
-<h1>{t}ACL type{/t} <select size="1" name="aclType" title="{t}Select an acl type{/t}" onChange="document.mainform.submit()">&nbsp;</option>{html_options options=$aclTypes selected=$aclType}<option disabled></select>&nbsp;{if $javascript eq 'false'}<input type="submit" value="{t}Apply{/t}" name="refresh">{/if}</h1>
+<h1>{t}ACL type{/t} <select size="1" name="aclType" title="{t}Select an acl type{/t}" onChange="document.mainform.submit()">{html_options options=$aclTypes selected=$aclType}<option disabled>&nbsp;</option></select>&nbsp;{if $javascript eq 'false'}<input type="submit" value="{t}Apply{/t}" name="refresh">{/if}</h1>
 
 <p class="seperator">&nbsp;</p>
 
index a3a169a06e8685555823cbd6b80a26dd014c64c0..9a9a396c8f789124b0ead00937fc8707e5d9961a 100644 (file)
@@ -187,11 +187,13 @@ class acl extends plugin
 
     $new_acl= array();
     $aclDialog= FALSE;
+    $firstedit= FALSE;
     foreach($_POST as $name => $post){
 
       /* Actions... */
       if (preg_match('/^acl_edit_.*_x/', $name)){
         $this->dialogState= 'create';
+        $firstedit= TRUE;
         $this->dialog= TRUE;
         $this->currentIndex= preg_replace('/^acl_edit_([0-9]+).*$/', '\1', $name);
         $this->loadAclEntry();
@@ -263,7 +265,7 @@ class acl extends plugin
     }
     
     /* Only be interested in new acl's, if we're in the right _POST place */
-    if ($aclDialog && is_array($this->ocMapping[$this->aclObject])){
+    if ($aclDialog && $this->aclObject != "" && is_array($this->ocMapping[$this->aclObject])){
 
       foreach ($this->ocMapping[$this->aclObject] as $oc){
         unset($this->aclContents[$oc]);
@@ -278,7 +280,7 @@ class acl extends plugin
     }
 
     /* Save new acl in case of base edit mode */
-    if ($this->aclType == 'base'){
+    if ($this->aclType == 'base' && !$firstedit){
       $this->aclContents= $new_acl;
     }
 
@@ -533,8 +535,8 @@ class acl extends plugin
     $display .= "<input ".$style." type='button' name='set_false_all_read' onClick=\"acl_set_all('[^0]_r$',false);\" value='R-'>";
     $display .= "<input ".$style." type='button' name='set_true_all_write' onClick=\"acl_set_all('[^0]_w$',true);\" value='W+'>";
     $display .= "<input ".$style." type='button' name='set_false_all_write' onClick=\"acl_set_all('[^0]_w$',false);\" value='W-'>";
-    /* Build general objects */
 
+    /* Build general objects */
     $list =$this->sort_by_priority($list);
     foreach ($list as $key => $name){
 
@@ -597,7 +599,7 @@ class acl extends plugin
 
       $display.= "\n  <tr>".
                  "\n    <td style='background-color:#E0E0E0' colspan=".($cols-1).">$options</td>".
-                 "\n    <td style='background-color:#D4D4D4'>&nbsp;".("Complete object:")." $more_options</td>".
+                 "\n    <td style='background-color:#D4D4D4'>&nbsp;"._("Complete object").": $more_options</td>".
                  "\n  </tr>";
 
       /* Walk through the list of attributes */
index de19b3efb7ee4fbcd0de5a73435932431b8ceeaa..c434af47fa7a45ad60c1adb7a4b1c7ce8202ad94 100644 (file)
@@ -177,8 +177,9 @@ class intranetAccount extends plugin
           "plShortName"     => _("Intranet"),
           "plDepends"       => array("user"),
           "plPriority"      => 25,                                 // Position in tabs
-          "plSection"       => "personal",                        // This belongs to personal
-          "plCategory"      => array("users"),
+          "plSection"     => array("personal" => _("My account")),
+          "plCategory"    => array("users" => array("description" => _("Intranet account"),
+                                                  "objectClass" => "gosaIntranetAccount")),
           "plOptions"       => array(),
 
           "plDescription"       => _("Intranet account settings")."&nbsp;:&nbsp;<u>"._("Connectivity addon")."</u>",
index adcca5c97e7622f28844cc6390e484ade7149850..85245ebdf0316de062cdc3b5476ad5c19cc2712a 100644 (file)
@@ -448,8 +448,9 @@ class kolabAccount extends plugin
           "plSelfModify"    => TRUE,
           "plDepends"       => array("user"),
           "plPriority"      => 20,                                 // Position in tabs
-          "plSection"       => "personal",                        // This belongs to personal
-          "plCategory"      => array("users"),
+          "plSection"     => array("personal" => _("My account")),
+          "plCategory"    => array("users" => array("description" => _("Kolab account"),
+                                                  "objectClass" => "kolabAccount")),
           "plOptions"       => array(),
 
           "plProvidedAcls"  => array(
index 8a5ba5211f7f48231c9079a64819cd30d6a3a4a7..558ce4c4ae22c48d2b1c3004d131439724a62212 100644 (file)
@@ -311,8 +311,9 @@ class opengwAccount extends plugin
           "plSelfModify"    => TRUE,
           "plDepends"       => array("user"),
           "plPriority"      => 26,                                 // Position in tabs
-          "plSection"       => "personal",                        // This belongs to personal
-          "plCategory"      => array("users"),
+          "plSection"     => array("personal" => _("My account")),
+          "plCategory"    => array("users" => array("description" => _("Opengroupware"),
+                                                  "objectClass" => "openGroupwareAccount")),
           "plOptions"       => array(),
 
           "plProvidedAcls"  => array(
index dac07f8d672c29473fc29ff81e62e7f3e37a846b..7a91e92ab3024843d3ad3937674e8eed1549b3a6 100644 (file)
@@ -951,8 +951,9 @@ class oxchangeAccount extends plugin
           "plSelfModify"    => TRUE,
           "plDepends"       => array("user"),
           "plPriority"      => 27,                                 // Position in tabs
-          "plSection"       => "personal",                        // This belongs to personal
-          "plCategory"      => array("users"),
+          "plSection"     => array("personal" => _("My account")),
+          "plCategory"    => array("users" => array("description" => _("OpenExchange account"),
+                                                    "objectClass" => "OXUserObject")),
           "plOptions"       => array(),
 
           "plProvidedAcls"  => array(
index ed56648d62826fd44e33437d97e2077f66526915..143fcb8e52509ad3001f3a23913aa0b38b5f6548 100644 (file)
@@ -144,8 +144,9 @@ class phpgwAccount extends plugin
           "plSelfModify"    => TRUE,
           "plDepends"       => array("user"),
           "plPriority"      => 24,                                 // Position in tabs
-          "plSection"       => "personal",                        // This belongs to personal
-          "plCategory"      => array("users"),
+          "plSection"     => array("personal" => _("My account")),
+          "plCategory"    => array("users" => array("description" => _("PHPgroupware"),
+                                                    "objectClass" => "phpgwAccount")),
           "plOptions"       => array(),
 
           "plProvidedAcls"  => array()
index ee9042f45f60f1126a9ab42e241ad8fe918da320..78da8dfb0c837e6642d80ff802927077af86566b 100644 (file)
@@ -145,8 +145,10 @@ class phpscheduleitAccount extends plugin
           "plSelfModify"    => TRUE,
           "plDepends"       => array("user"),
           "plPriority"      => 29,                                 // Position in tabs
-          "plSection"       => "personal",                        // This belongs to personal
-          "plCategory"      => array("users"),
+          "plSection"     => array("personal" => _("My account")),
+          "plCategory"    => array("users" => array("description" => _("PHP schedule it"),
+                                                  "objectClass" => "phpscheduleitAccount")),
+
           "plOptions"       => array(),
 
           "plProvidedAcls"  => array()
index a7c1a452988fef669582cc896190b32286a32ca4..22ef56389c4e1536b225ff7ba186ac7e86d629b2 100644 (file)
@@ -160,8 +160,9 @@ class pptpAccount extends plugin
           "plSelfModify"    => TRUE,
           "plDepends"       => array("user"),
           "plPriority"      => 28,                                 // Position in tabs
-          "plSection"       => "personal",                        // This belongs to personal
-          "plCategory"      => array("users"),
+          "plSection"     => array("personal" => _("My account")),
+          "plCategory"    => array("users" => array("description" => _("PPTP account"),
+                                                  "objectClass" => "pptpServerAccount")),
           "plOptions"       => array(),
 
           "plProvidedAcls"  => array()
index bd39ed60da2c107e6d9a88a81c750415ac0f0c8c..7b333061ebafd7e3426e24cb238ccb1377493825 100644 (file)
@@ -293,8 +293,9 @@ class proxyAccount extends plugin
           "plSelfModify"    => TRUE,
           "plDepends"       => array("user"),
           "plPriority"      => 21,                                 // Position in tabs
-          "plSection"       => "personal",                        // This belongs to personal
-          "plCategory"      => array("users"),
+          "plSection"     => array("personal" => _("My account")),
+          "plCategory"    => array("users" => array("description" => _("Proxy account"),
+                                                  "objectClass" => "gosaProxyAccount")),
           "plOptions"       => array(),
 
           "plProvidedAcls"  => array(
index 1597e543606a7d333ae394feff3268bce306b87a..fc967e85637fa8fd1a397a64ae93745c1463038a 100644 (file)
@@ -220,8 +220,9 @@ class pureftpdAccount extends plugin
           "plSelfModify"    => TRUE,
           "plDepends"       => array("user"),
           "plPriority"      => 22,                                 // Position in tabs
-          "plSection"       => "personal",                        // This belongs to personal
-          "plCategory"      => array("users"),
+          "plSection"     => array("personal" => _("My account")),
+          "plCategory"    => array("users" => array("description" => _("FTP account"),
+                                                  "objectClass" => "PureFTPdUser")),
           "plOptions"       => array(),
 
           "plProvidedAcls"  => array(
index 506c1f72a03f3b95ef8f8e28df6172709ed59405..7460e4bdee84a9a00f9614e19e1660388e6f4b8f 100644 (file)
@@ -143,8 +143,9 @@ class webdavAccount extends plugin
           "plSelfModify"    => TRUE,
           "plDepends"       => array("user"),
           "plPriority"      => 23,                                 // Position in tabs
-          "plSection"       => "personal",                        // This belongs to personal
-          "plCategory"      => array("users"),
+          "plSection"     => array("personal" => _("My account")),
+          "plCategory"    => array("users" => array("description" => _("WebDAV account"),
+                                                  "objectClass" => "gosaWebdavAccount")),
           "plOptions"       => array(),
 
           "plProvidedAcls"  => array()
index ebd10c5aa4a395323900842e9121a74b80189565..a0fd23c6d49adb489c0fc083a916c12295eb5dc2 100644 (file)
@@ -1271,8 +1271,11 @@ class environment extends plugin
           "plSelfModify"    => TRUE,                              
           "plDepends"       => array("user", "posixAccount"),     // This plugin depends on 
           "plPriority"      => 3,                                 // Position in tabs 
-          "plSection"       => "personal",                        // This belongs to personal
-          "plCategory"      => array("users", "groups"),          // Add to following categories 
+          "plSection"     => array("personal" => _("My account")),
+          "plCategory"    => array("users" => array("description" => _("Environment settings"),
+                                                    "objectClass" => "gotoEnvironment"),
+                                   "groups" => array("description" => _("Environment settings"),
+                                                    "objectClass" => "gotoEnvironment")),
           "plOptions"       => array("resolution_hook" => array("type" => "string",
               "description" => _("Command to extend the list of possible screen resolutions"))),
 
index a2d25996817e375f83453d32b3f9b99ecddac489..7e19daef7c9faaafd3daa1496e55ce4f9095263d 100644 (file)
@@ -1008,8 +1008,9 @@ class mailAccount extends plugin
           "plSelfModify"    => TRUE,
           "plDepends"       => array("user"),                     // This plugin depends on
           "plPriority"      => 4,                                 // Position in tabs
-          "plSection"       => "personal",                        // This belongs to personal
-          "plCategory"      => array("users"),                    // Add to following categories
+          "plSection"     => array("personal" => _("My account")),
+          "plCategory"    => array("users" => array("description" => _("Mail account"),
+                                                    "objectClass" => "gosaMailAccount")),
           "plOptions"       => array(),
   
           "plProvidedAcls"  => array(
index 9c679f6e9a2ed4329cce4b02cf745b1605afbe85..a19d0b1a7fbec53d9fb670c6c86f4eca919e127f 100644 (file)
@@ -261,8 +261,9 @@ class nagiosAccount extends plugin
           "plSelfModify"    => TRUE,
           "plDepends"       => array("user"),
           "plPriority"      => 8,                                 // Position in tabs
-          "plSection"       => "personal",                        // This belongs to personal
-          "plCategory"      => array("users"),                   
+          "plSection"     => array("personal" => _("My account")),
+          "plCategory"    => array("users" => array("description" => _("Nagios account"),
+                                                    "objectClass" => array("nagiosContact", "nagiosAuth"))),
           "plOptions"       => array(),
 
           "plProvidedAcls"  => array(
index f63cae18b96f1a5f566398cab949a1870d37b26e..96f88fd72ad12894dd1b84328bc2eeec4f1f04ad 100644 (file)
@@ -356,8 +356,9 @@ class netatalk extends plugin {
           "plSelfModify"      => TRUE,
           "plDepends"         => array("user"),
           "plPriority"        => 6,
-          "plSection"         => "personal",
-          "plCategory"        => array("users"),
+          "plSection"     => array("personal" => _("My account")),
+          "plCategory"    => array("users" => array("description" => _("Netatalk account"),
+                                                    "objectClass" => "apple-user")),
           "plOptions"         => array(),
 
           "plProvidedAcls"  => array(
index 28215b037b923489c4e1f6f8d40e228d83e8293d..94f64e7bcc9064b6c5e85f037e5d4df7fd08efd2 100644 (file)
@@ -13,8 +13,9 @@ class password
           "plSelfModify"      => TRUE,
           "plDepends"         => array("user"),
           "plPriority"        => 10,
-          "plSection"         => "personal",
-          "plCategory"        => array("users"),
+          "plSection"     => array("personal" => _("My account")),
+          "plCategory"    => array("users" => array("description" => _("Password"),
+                                                    "objectClass" => "gosaAccount")),
           "plOptions"         => array(),
 
           "plProvidedAcls"  => array())
index b512d2db46a1111efb2c088e4a780d4cb1dfc342..77ce8bfdfac81c1f59aaa845e671305229564c9f 100644 (file)
@@ -1310,8 +1310,9 @@ class posixAccount extends plugin
           "plSelfModify"      => TRUE,
           "plDepends"         => array("user"),
           "plPriority"        => 2,
-          "plSection"         => "personal", 
-          "plCategory"        => array("users"),
+          "plSection"         => array("personal" => _("My account")),
+          "plCategory"        => array("users" => array("description" => _("Posix Account"),
+                                                        "objectClass" => "posixAccount")),
           "plOptions"         => array(),
 
           "plProvidedAcls"  => array(
index 98357370a1e5b8a5294e8fc579357e35b0c79e5b..d48d8821e9fee3acd6dfd6b30086c3b7fa2ea5b6 100644 (file)
@@ -1042,9 +1042,10 @@ class sambaAccount extends plugin
           "plDescription"   => _("Samba settings"),
           "plSelfModify"    => TRUE,
           "plDepends"       => array("user"),
-          "plPriority"      => 5,                                 // Position in tabs
-          "plSection"       => "personal",                        // This belongs to personal
-          "plCategory"      => array("users"),                    // Add to following categories
+          "plPriority"      => 5,
+          "plSection"     => array("personal" => _("My account")),
+          "plCategory"    => array("users" => array("description" => _("Samba account"),
+                                                    "objectClass" => array("sambaSamAccount"))),
           "plOptions"       => array(),
 
           "plProvidedAcls"  => array(