Code Duplication    Length = 4-7 lines in 2 locations

apps/files_sharing/lib/Helper.php 1 location

@@ 119-125 (lines=7) @@
116
					return true;
117
				}
118
			}
119
		} else {
120
			// not authenticated ?
121
			if (\OC::$server->getSession()->exists('public_link_authenticated')
122
				&& \OC::$server->getSession()->get('public_link_authenticated') !== (string)$share->getId()) {
123
				return true;
124
			}
125
		}
126
		return false;
127
	}
128

lib/private/Share/Share.php 1 location

@@ 1837-1840 (lines=4) @@
1834
			return true;
1835
		}
1836
1837
		if ( \OC::$server->getSession()->exists('public_link_authenticated')
1838
			&& \OC::$server->getSession()->get('public_link_authenticated') === (string)$linkItem['id'] ) {
1839
			return true;
1840
		}
1841
1842
		return false;
1843
	}