code: public function userHasRight(array $user, $right) {
  		$hasRight = false;
  		if (isset($user['role']) && !empty($right) && isset($this->_rightsConfig[$right])) {
  			if (in_array($user['role'], $this->_rightsConfig[$right])) {
  				$hasRight = true;
  			}
  		}
  		return $hasRight;
  	}
docs: Checks if the given user has a right
  
  @param array $user user to check
  @param string $right right name
  @return bool