}
// determine if it's staff!!!
-
- if ($au->company()->comptype != 'OWNER') {
+ $owncomp = DB_DataObject::Factory('Companies');
+ $owncomp->get('comptype', 'OWNER');
+ $isStaff = ($this->company_id == $owncomp->id);
+
+
+ if (!$isStaff) {
// - can not change company!!!
if ($changes &&
return false;
}
+
// mtrack had the idea that all 'S' should be allowed.. - but filtered later..
// ???? do we want this?
return $this->company_id == $au->company_id;
}
-
+
// yes, only owner company can mess with this...
- $owncomp = DB_DataObject::Factory('Companies');
- $owncomp->get('comptype', 'OWNER');
- $isStaff = ($this->company_id == $owncomp->id);
+
switch ($lvl) {