Code Duplication    Length = 7-7 lines in 3 locations

apps/dav/lib/Connector/Sabre/FilesReportPlugin.php 1 location

@@ 390-396 (lines=7) @@
387
	/**
388
	 * Returns whether the currently logged in user is an administrator
389
	 */
390
	private function isAdmin() {
391
		$user = $this->userSession->getUser();
392
		if ($user !== null) {
393
			return $this->groupManager->isAdmin($user->getUID());
394
		}
395
		return false;
396
	}
397
}
398

apps/dav/lib/SystemTag/SystemTagsByIdCollection.php 1 location

@@ 74-80 (lines=7) @@
71
	 *
72
	 * @return bool true if the user is an admin
73
	 */
74
	private function isAdmin() {
75
		$user = $this->userSession->getUser();
76
		if ($user !== null) {
77
			return $this->groupManager->isAdmin($user->getUID());
78
		}
79
		return false;
80
	}
81
82
	/**
83
	 * @param string $name

lib/private/NavigationManager.php 1 location

@@ 209-215 (lines=7) @@
206
		}
207
	}
208
209
	private function isAdmin() {
210
		$user = $this->userSession->getUser();
211
		if ($user !== null) {
212
			return $this->groupManager->isAdmin($user->getUID());
213
		}
214
		return false;
215
	}
216
217
	private function isSubAdmin() {
218
		$user = $this->userSession->getUser();