}
function beforeUpdate($old, $q, $roo)
+ {
+ if(!$this->hasPermission($roo)) {
+ $roo->jerr('Access Dennied');
+ }
+
+
+ }
+
+ function beforeDelete($dependants_array, $roo)
{
if(
!$roo->authUser ||
}
}
- function beforeDelete($dependants_array, $roo)
+ function hasPermission($roo)
{
if(
!$roo->authUser ||
(!empty($this->person_id) && $this->person_id != $roo->authUser->id)
) {
- $roo->jerr('Access Dennied');
+ return false;
}
+
+ return true;
}
function isExist()