if (!$res) {
return $res;
}
+
+ if (!$this->authUser && $this->authUser->company()->comptype == 'OWNER') {
+ return true;
+ }
+ // 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 'severity':
+ case 'classification':
+ case 'severity':
+ case 'resolution':
+ case 'priority':
+ case 'ticketstate':
+
// not a member of the company..
// not allowed in..
- return false;
+ return true;
+ }
+ return false;
+
+ default:
+ return false;
- return $res;
-
}
-}
\ No newline at end of file
+}