View.php
authorAlan Knowles <alan@roojs.com>
Tue, 18 Dec 2018 04:33:06 +0000 (12:33 +0800)
committerAlan Knowles <alan@roojs.com>
Tue, 18 Dec 2018 04:33:06 +0000 (12:33 +0800)
View.php

index f92f0b5..aac2636 100644 (file)
--- a/View.php
+++ b/View.php
@@ -10,8 +10,16 @@ class Pman_MTrack_View extends Pman
     }
     function get($id = '', $opts=array())
     {
-        if (empty($id))
         
+        $t = DB_DAtaObject::factory('mtrack_ticket');
+        $t->autoJoin();
+        if (empty($id) || !$t->get($id)) {
+            $this->jerr('invalid ticket');
+        }
+        if (!$t->checkPerm('S', $this->authUser)) {
+            $this->jerr("access denied");
+        }
+        $this->ticket = $t;
         
     }
 }