src/Lib/UserRights.php
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;
	}
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;
	}
Checks if the given user has a right

@param array $user user to check
@param string $right right name
@return bool