Fix #5791 - Search Criteria on Orders / Columns on orders
[Pman.Core] / DataObjects / Core_person_settings.php
diff --git a/DataObjects/Core_person_settings.php b/DataObjects/Core_person_settings.php
new file mode 100644 (file)
index 0000000..0dd1ac7
--- /dev/null
@@ -0,0 +1,42 @@
+<?php
+/**
+ * Table Definition for Core_person_settings
+ */
+class_exists('DB_DataObject') ? '' : require_once 'DB/DataObject.php';
+
+class Pman_Core_DataObjects_Core_person_settings extends DB_DataObject 
+{
+    ###START_AUTOCODE
+    /* the code below is auto generated do not remove the above tag */
+
+    public $__table = 'core_person_settings';
+    public $id;
+    public $person_id;
+    public $scope;
+    public $data;
+    
+    /* the code above is auto generated do not remove the tag below */
+    ###END_AUTOCODE
+    
+    function beforeInsert($q, $roo)
+    {
+        if(
+                !$roo->authUser ||
+                (!empty($this->person_id) && $this->person_id != $roo->authUser->id)
+        ) {
+            $roo->jerr('Access Dennied');
+        }
+        
+    }
+    
+    function beforeUpdate($old, $q, $roo)
+    {
+        if(
+                !$roo->authUser ||
+                (!empty($this->person_id) && $this->person_id != $roo->authUser->id)
+        ) {
+            $roo->jerr('Access Dennied');
+        }
+    }
+    
+ }