/** * check if mount point is applicable to user * * @param array $mount contains $mount['applicable']['users'], $mount['applicable']['groups'] * @param string $uid * @return boolean */ private function isMountPointApplicableToUser($mount, $uid) { $acceptedUids = array('all', $uid); // check if mount point is applicable for the user $intersection = array_intersect($acceptedUids, $mount['applicable']['users']); if (!empty($intersection)) { return true; } // check if mount point is applicable for group where the user is a member foreach ($mount['applicable']['groups'] as $gid) { if ($this->groupManager->isInGroup($uid, $gid)) { return true; } } return false; }