'Mtrack_ticket', /// all of these MUST have applyFilters, and check authenication..
'mtrack_change',
'core_enum',
- 'Person',
+ //'Person', // fixme - need to verify this is protected..
'mtrack_milestone',
- 'Projects',
- 'Images',
- 'mtrack_repos'
+ 'Projects', // fixme - we should remove code from projects....
+ 'Images', // not sure about this...
+ 'mtrack_repos' // not sure about this...
);
// need perms sorting out first.
}
- function checkPerm($obj, $lvl, $req=null) {
- $res = parent::checkPerm($obj,$lvl,$req);
- if (!$res) {
- return $res;
- }
+ function checkPerm($obj, $lvl, $req=null)
+ {
+ //if ($this->authUser) {
+ $res = parent::checkPerm($obj,$lvl,$req);
+
+ if ($res) {
+ return $res;
+ }
+ //}
+ // not authenticated...
+
+ // these checks only apply to non-company users.
+
// normally allowed, but we have more restrictions...
switch($obj->tablename()) {
+
case 'core_enum':
- if (empty($req['etype']) {
+ if (empty($req['etype'])) {
+ return false;
+ }
+ if ($lvl != 'S') {
return false;
}
+
switch ($req['etype']) {
-
- if ($perm == 'S') {
- return true;
- }
-
-
- if (!$au) {
- return false;
- }
-
- if ($au->company()->comptype == 'OWNER') {
- return true;
- }
+ case 'classification':
+ //case 'severity':
+ case 'resolution':
+ case 'priority':
+ case 'ticketstate':
+
// not a member of the company..
// not allowed in..
- return false;
+ return true;
+ default:
+ return false;
+ }
+ break; // should not get here...
+
+ default:
+ return false;
}
-
-
- return $res;
-
}
-}
\ No newline at end of file
+
+
+}