Code

Updated with skip_write flag
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 20 Jul 2006 06:58:49 +0000 (06:58 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 20 Jul 2006 06:58:49 +0000 (06:58 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4247 594d385d-05f5-0310-b6e9-bd551577e9d8

include/class_userinfo.inc

index 447b0016c42c9779e64c595ef3b96e613a345b39..6c5fa14307f1bea76ba8bef40ccfe0858261188e 100644 (file)
@@ -158,7 +158,7 @@ class userinfo
   }
 
 
-  function get_permissions($dn, $object, $attribute)
+  function get_permissions($dn, $object, $attribute, $skip_write= FALSE)
   {
     $acl= array("r" => "", "w" => "", "c" => "", "d" => "", "m" => "");
 
@@ -220,6 +220,11 @@ class userinfo
       }
     }
 
+    /* Remove write if needed */
+    if ($skip_write){
+      $ret= preg_replace('/w/', '', $ret);
+    }
+
     return ($ret);
   }