From: cajus Date: Wed, 13 Dec 2006 09:16:31 +0000 (+0000) Subject: ACL updates and fixes part 1 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=af3743878cb005b76b2a568acdde1a3b2eaf72f1;p=gosa.git ACL updates and fixes part 1 git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@5374 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/html/main.php b/html/main.php index d84fda331..478fd0f00 100644 --- a/html/main.php +++ b/html/main.php @@ -380,7 +380,7 @@ print_red(NULL); /* Second part of browser 'back button used' check */ $_SESSION['back_button_test'] ++; $bb = ""; -$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 "

".get_MicroTimeDiff($start,microtime())."

"; -$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: ?> diff --git a/ihtml/themes/default/acl.tpl b/ihtml/themes/default/acl.tpl index 84a108cea..5df679383 100644 --- a/ihtml/themes/default/acl.tpl +++ b/ihtml/themes/default/acl.tpl @@ -5,7 +5,7 @@ {/if} {if $dialogState eq 'create'} -

{t}ACL type{/t}  {if $javascript eq 'false'}{/if}

+

{t}ACL type{/t}  {if $javascript eq 'false'}{/if}

 

diff --git a/include/class_acl.inc b/include/class_acl.inc index a3a169a06..9a9a396c8 100644 --- a/include/class_acl.inc +++ b/include/class_acl.inc @@ -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 .= ""; $display .= ""; $display .= ""; - /* 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 ". "\n $options". - "\n  ".("Complete object:")." $more_options". + "\n  "._("Complete object").": $more_options". "\n "; /* Walk through the list of attributes */ diff --git a/plugins/personal/connectivity/class_intranetAccount.inc b/plugins/personal/connectivity/class_intranetAccount.inc index de19b3efb..c434af47f 100644 --- a/plugins/personal/connectivity/class_intranetAccount.inc +++ b/plugins/personal/connectivity/class_intranetAccount.inc @@ -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")." : "._("Connectivity addon")."", diff --git a/plugins/personal/connectivity/class_kolabAccount.inc b/plugins/personal/connectivity/class_kolabAccount.inc index adcca5c97..85245ebdf 100644 --- a/plugins/personal/connectivity/class_kolabAccount.inc +++ b/plugins/personal/connectivity/class_kolabAccount.inc @@ -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( diff --git a/plugins/personal/connectivity/class_opengwAccount.inc b/plugins/personal/connectivity/class_opengwAccount.inc index 8a5ba5211..558ce4c4a 100644 --- a/plugins/personal/connectivity/class_opengwAccount.inc +++ b/plugins/personal/connectivity/class_opengwAccount.inc @@ -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( diff --git a/plugins/personal/connectivity/class_oxchangeAccount.inc b/plugins/personal/connectivity/class_oxchangeAccount.inc index dac07f8d6..7a91e92ab 100644 --- a/plugins/personal/connectivity/class_oxchangeAccount.inc +++ b/plugins/personal/connectivity/class_oxchangeAccount.inc @@ -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( diff --git a/plugins/personal/connectivity/class_phpgwAccount.inc b/plugins/personal/connectivity/class_phpgwAccount.inc index ed56648d6..143fcb8e5 100644 --- a/plugins/personal/connectivity/class_phpgwAccount.inc +++ b/plugins/personal/connectivity/class_phpgwAccount.inc @@ -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() diff --git a/plugins/personal/connectivity/class_phpscheduleitAccount.inc b/plugins/personal/connectivity/class_phpscheduleitAccount.inc index ee9042f45..78da8dfb0 100644 --- a/plugins/personal/connectivity/class_phpscheduleitAccount.inc +++ b/plugins/personal/connectivity/class_phpscheduleitAccount.inc @@ -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() diff --git a/plugins/personal/connectivity/class_pptpAccount.inc b/plugins/personal/connectivity/class_pptpAccount.inc index a7c1a4529..22ef56389 100644 --- a/plugins/personal/connectivity/class_pptpAccount.inc +++ b/plugins/personal/connectivity/class_pptpAccount.inc @@ -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() diff --git a/plugins/personal/connectivity/class_proxyAccount.inc b/plugins/personal/connectivity/class_proxyAccount.inc index bd39ed60d..7b333061e 100644 --- a/plugins/personal/connectivity/class_proxyAccount.inc +++ b/plugins/personal/connectivity/class_proxyAccount.inc @@ -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( diff --git a/plugins/personal/connectivity/class_pureftpdAccount.inc b/plugins/personal/connectivity/class_pureftpdAccount.inc index 1597e5436..fc967e856 100644 --- a/plugins/personal/connectivity/class_pureftpdAccount.inc +++ b/plugins/personal/connectivity/class_pureftpdAccount.inc @@ -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( diff --git a/plugins/personal/connectivity/class_webdavAccount.inc b/plugins/personal/connectivity/class_webdavAccount.inc index 506c1f72a..7460e4bde 100644 --- a/plugins/personal/connectivity/class_webdavAccount.inc +++ b/plugins/personal/connectivity/class_webdavAccount.inc @@ -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() diff --git a/plugins/personal/environment/class_environment.inc b/plugins/personal/environment/class_environment.inc index ebd10c5aa..a0fd23c6d 100644 --- a/plugins/personal/environment/class_environment.inc +++ b/plugins/personal/environment/class_environment.inc @@ -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"))), diff --git a/plugins/personal/mail/class_mailAccount.inc b/plugins/personal/mail/class_mailAccount.inc index a2d259968..7e19daef7 100644 --- a/plugins/personal/mail/class_mailAccount.inc +++ b/plugins/personal/mail/class_mailAccount.inc @@ -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( diff --git a/plugins/personal/nagios/class_nagiosAccount.inc b/plugins/personal/nagios/class_nagiosAccount.inc index 9c679f6e9..a19d0b1a7 100644 --- a/plugins/personal/nagios/class_nagiosAccount.inc +++ b/plugins/personal/nagios/class_nagiosAccount.inc @@ -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( diff --git a/plugins/personal/netatalk/class_netatalk.inc b/plugins/personal/netatalk/class_netatalk.inc index f63cae18b..96f88fd72 100644 --- a/plugins/personal/netatalk/class_netatalk.inc +++ b/plugins/personal/netatalk/class_netatalk.inc @@ -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( diff --git a/plugins/personal/password/class_password.inc b/plugins/personal/password/class_password.inc index 28215b037..94f64e7bc 100644 --- a/plugins/personal/password/class_password.inc +++ b/plugins/personal/password/class_password.inc @@ -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()) diff --git a/plugins/personal/posix/class_posixAccount.inc b/plugins/personal/posix/class_posixAccount.inc index b512d2db4..77ce8bfdf 100644 --- a/plugins/personal/posix/class_posixAccount.inc +++ b/plugins/personal/posix/class_posixAccount.inc @@ -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( diff --git a/plugins/personal/samba/class_sambaAccount.inc b/plugins/personal/samba/class_sambaAccount.inc index 98357370a..d48d8821e 100644 --- a/plugins/personal/samba/class_sambaAccount.inc +++ b/plugins/personal/samba/class_sambaAccount.inc @@ -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(