Code Duplication    Length = 4-7 lines in 2 locations

apps/files_sharing/lib/Helper.php 1 location

@@ 156-162 (lines=7) @@
153
			}
154
155
		}
156
		else {
157
			// not authenticated ?
158
			if ( ! \OC::$server->getSession()->exists('public_link_authenticated')
159
				|| \OC::$server->getSession()->get('public_link_authenticated') !== (string)$linkItem['id']) {
160
				return false;
161
			}
162
		}
163
		return true;
164
	}
165

lib/private/Share/Share.php 1 location

@@ 2495-2498 (lines=4) @@
2492
			return true;
2493
		}
2494
2495
		if ( \OC::$server->getSession()->exists('public_link_authenticated')
2496
			&& \OC::$server->getSession()->get('public_link_authenticated') === (string)$linkItem['id'] ) {
2497
			return true;
2498
		}
2499
2500
		return false;
2501
	}