DataObjects/Core_group.php
[Pman.Core] / DataObjects / Events.php
index 9c4569d..e5650a8 100644 (file)
@@ -257,9 +257,14 @@ class Pman_Core_DataObjects_Events extends DB_DataObject
         
     }
     
-    function permission_filter()
+    function applyPermissionFilters($q, $au ,$roo)
     {
-        
+        if (!$au->hasPerm("Admin.Admin_Tab", 'S')) {
+            //DB_DataObject::DebugLevel(1);
+            // they can only view their changes..
+            $this->whereAdd("($tn.person_id = {$au->id} OR $tn.person_id = 0)");
+//            $this->person_id = $au->id;
+        }
     }
     
     /**
@@ -505,6 +510,7 @@ class Pman_Core_DataObjects_Events extends DB_DataObject
             
             @mkdir(dirname($file),0700,true); // this might fail if it does not have correct permissions..
             if (!file_exists(dirname($file))) {
+                print_r($this);
                 die("could not create $file - permissons are not correct"); // fatal, otherwise we loop!?
             }