Code

Some acl fixes for several addons
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 5 Dec 2006 10:05:06 +0000 (10:05 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 5 Dec 2006 10:05:06 +0000 (10:05 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@5304 594d385d-05f5-0310-b6e9-bd551577e9d8

include/class_userinfo.inc
plugins/addons/ldapmanager/class_exportxls.inc
plugins/gofax/blocklists/class_blocklistManagement.inc
plugins/gofax/faxreports/class_faxreport.inc
plugins/gofon/fonreports/class_fonreport.inc

index 85417cdb150254e873884e716683968338515409..4b2f11b2e2d6ea089e0fb319efc2884c63580ddc 100644 (file)
@@ -352,6 +352,9 @@ class userinfo
 
   function mergeACL($acl, $type, $newACL)
   {
+    if(preg_match("/w/",$newACL) && !preg_match("/r/",$newACL)){
+      $newACL .= "r";
+    }
     foreach(str_split($newACL) as $char){
 
       /* Ignore invalid characters */
index 8a830d1069b86c8d64f4911359a294715196f160..0135d6e901da8dd50b25db397665f66b0e91c7b7 100644 (file)
@@ -32,6 +32,8 @@ class xlsexport extends plugin
     $smarty->assign("type",FALSE);
     $smarty->assign("depselectivbb","");
     
+    if(!isset($_POST['selfull'])) $_POST['selfull'] = "Somehow not posted";
+
     /* Check permissions for export */
     // fill in old vars in the Export form
     if((isset($_POST['single']))&&(isset($_POST['sfrmgetsingle']))){
@@ -96,7 +98,7 @@ class xlsexport extends plugin
       $acls = $this->ui->get_permissions($dn,"all/all");
     }
  
-    if((!preg_match("/r/",$acls)) && isset($dn)){
+    if(!preg_match("/r/",$acls)){
 
       /* Show error msg */      
       print_red(sprintf(_("You are not allowed to export the given ldap entry (%s)"),@LDAP::fix($dn)));
index ef2332d83ce9370877ba6007863d624a88c5a43c..c5b08286bb9a660da5f8f7155157428fb24fe4a8 100644 (file)
@@ -580,7 +580,7 @@ class blocklist extends plugin
     return (array(  
           "plShortName"       => _("Fax"),
           "plDescription"     => _("Fax Blocklists"),
-          "plSelfModify"      => TRUE,
+          "plSelfModify"      => FALSE,
           "plDepends"         => array(),
 
           "plPriority"    => 0,
index 0e1340d3f9387d62a19d30e1c379cb0ef6349462..bed39e0caee5c4b3a6e02449e6121d1f4a7bf4bb 100644 (file)
@@ -30,6 +30,7 @@ class faxreport extends plugin
   var $objectclasses= array();
   var $fax_users    = array();
 
+
   /* Create class */
   function faxreport ($config, $ui)
   {
index a01579672ab8d7ed47cc7204420f28f6d402424b..defaa4e7916ad21c52659be55de0a9cf4fe5127e 100644 (file)
@@ -203,8 +203,10 @@ class fonreport extends plugin
     $no_acl = "<img class='center' src='images/closedlock.png'
       title='"._("Insufficient permissions to view this attribute")."' alt='"._("Insufficient permissions")."'>";
 
+    $no_acl = "&nbsp;";
+
     while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
-   
+
       foreach($line as $attr => $value){
 
         if($attr == "duration") continue;
@@ -318,12 +320,11 @@ class fonreport extends plugin
     $s          = preg_replace("/\%/","",$s);  
     $s2         = preg_replace("/\*/","%",$s);  
 
-    $filter = "(&(objectClass=gosaAccount)(!(objectClass=gosaUserTemplate))(objectClass=gofonAccount)".
+    $filter = "(&(objectClass=gosaAccount)(!(objectClass=gosaUserTemplate))".
         "(|(uid=$s)(l=$s)(homePhone=$s)(telephoneNumber=$s)(facsimileTelephoneNumber=$s)(mobile=$s)".
         "(pager=$s)(cn=$s)(givenName=$s)(sn=$s)(personalTitle=$s)(title=$s)))";
 
     $attrs  = array("uid");
-
     $res    = get_list($filter,"users",$this->search_base,$attrs);
     
     $str = " AND (";
@@ -387,7 +388,7 @@ class fonreport extends plugin
   {
     return (array(
         "plShortName"   => _("Phone reports"),
-        "plDescription" => _("Phone reports"),
+        "plDescription" => _("Phone reports")."&nbsp;<i>"._("All entries are readonly")."</i>",
         "plSelfModify"  => TRUE,
         "plDepends"     => array(),
         "plPriority"    => 0,