예제 #1
0
	/**
	 * 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());
		}
	}
예제 #2
0
	/**
	 * 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
예제 #3
0
 /**
  * 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());
 }
예제 #4
0
	/**
	 * 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());
		}
	}
예제 #5
0
 function canLinkObject(Contact $user)
 {
     return can_read_sharing_table($user, $this->getId());
 }