/** * Returns true if $user can view this email * * @param Contact $user * @return boolean */ function canView(Contact $user) { $account = $this->getAccount(); if ($account) { return ($account->getContactId() == logged_user()->getId() || can_read_sharing_table($user, $this->getId())); }else{ return can_read_sharing_table($user, $this->getId()); } }
/** * Returns true if $user can access this webpage * * @param Contact $user * @return boolean */ function canView(Contact $user) { return can_read_sharing_table($user, $this->getId()); } // canView
/** * Returns true if user can download this Event * * @param Contact $user * @return boolean */ function canDownload(Contact $user) { return can_read_sharing_table($user, $this->getId()); }
/** * Can $user view this object * * @param User $user * @return boolean */ function canView(Contact $user) { if ($this->getRelObjectId() > 0) { return can_read_sharing_table($user, $this->getRelObjectId()); } else { return can_read_sharing_table($user, $this->getId()); } }
function canLinkObject(Contact $user) { return can_read_sharing_table($user, $this->getId()); }