Code Duplication    Length = 3-3 lines in 2 locations

apps/provisioning_api/lib/Controller/UsersController.php 2 locations

@@ 333-335 (lines=3) @@
330
331
		// If not permitted
332
		$subAdminManager = $this->groupManager->getSubAdmin();
333
		if(!$this->groupManager->isAdmin($currentLoggedInUser->getUID()) && !$subAdminManager->isUserAccessible($currentLoggedInUser, $targetUser)) {
334
			throw new OCSException('', \OCP\API::RESPOND_UNAUTHORISED);
335
		}
336
337
		// Go ahead with the delete
338
		if($targetUser->delete()) {
@@ 388-390 (lines=3) @@
385
386
		// If not permitted
387
		$subAdminManager = $this->groupManager->getSubAdmin();
388
		if(!$this->groupManager->isAdmin($currentLoggedInUser->getUID()) && !$subAdminManager->isUserAccessible($currentLoggedInUser, $targetUser)) {
389
			throw new OCSException('', \OCP\API::RESPOND_UNAUTHORISED);
390
		}
391
392
		// enable/disable the user now
393
		$targetUser->setEnabled($value);