@@ -331,16 +331,6 @@ protected function formatShare(IShare $share, ?Node $recipientNode = null): arra
331331 $ result = array_merge ($ result , $ deckShare );
332332 } catch (ContainerExceptionInterface $ e ) {
333333 }
334- } elseif ($ share ->getShareType () === IShare::TYPE_SCIENCEMESH ) {
335- $ result ['share_with ' ] = $ share ->getSharedWith ();
336- $ result ['share_with_displayname ' ] = '' ;
337-
338- try {
339- /** @var array{share_with: string, share_with_displayname: string, token: string} $scienceMeshShare */
340- $ scienceMeshShare = $ this ->getSciencemeshShareHelper ()->formatShare ($ share );
341- $ result = array_merge ($ result , $ scienceMeshShare );
342- } catch (ContainerExceptionInterface $ e ) {
343- }
344334 }
345335
346336
@@ -819,12 +809,6 @@ public function createShare(
819809 } catch (ContainerExceptionInterface $ e ) {
820810 throw new OCSForbiddenException ($ this ->l ->t ('Sharing %s failed because the back end does not support room shares ' , [$ node ->getPath ()]));
821811 }
822- } elseif ($ shareType === IShare::TYPE_SCIENCEMESH ) {
823- try {
824- $ this ->getSciencemeshShareHelper ()->createShare ($ share , $ shareWith , $ permissions , $ expireDate ?? '' );
825- } catch (ContainerExceptionInterface $ e ) {
826- throw new OCSForbiddenException ($ this ->l ->t ('Sharing %s failed because the back end does not support ScienceMesh shares ' , [$ node ->getPath ()]));
827- }
828812 } else {
829813 throw new OCSBadRequestException ($ this ->l ->t ('Unknown share type ' ));
830814 }
@@ -866,9 +850,8 @@ private function getSharedWithMe($node, bool $includeTags): array {
866850 $ circleShares = $ this ->shareManager ->getSharedWith ($ this ->userId , IShare::TYPE_CIRCLE , $ node , -1 , 0 );
867851 $ roomShares = $ this ->shareManager ->getSharedWith ($ this ->userId , IShare::TYPE_ROOM , $ node , -1 , 0 );
868852 $ deckShares = $ this ->shareManager ->getSharedWith ($ this ->userId , IShare::TYPE_DECK , $ node , -1 , 0 );
869- $ sciencemeshShares = $ this ->shareManager ->getSharedWith ($ this ->userId , IShare::TYPE_SCIENCEMESH , $ node , -1 , 0 );
870853
871- $ shares = array_merge ($ userShares , $ groupShares , $ circleShares , $ roomShares , $ deckShares, $ sciencemeshShares );
854+ $ shares = array_merge ($ userShares , $ groupShares , $ circleShares , $ roomShares , $ deckShares );
872855
873856 $ filteredShares = array_filter ($ shares , function (IShare $ share ) {
874857 return $ share ->getShareOwner () !== $ this ->userId && $ share ->getSharedBy () !== $ this ->userId ;
@@ -1579,14 +1562,6 @@ protected function canAccessShare(IShare $share, bool $checkGroups = true): bool
15791562 }
15801563 }
15811564
1582- if ($ share ->getShareType () === IShare::TYPE_SCIENCEMESH ) {
1583- try {
1584- return $ this ->getSciencemeshShareHelper ()->canAccessShare ($ share , $ this ->userId );
1585- } catch (ContainerExceptionInterface $ e ) {
1586- return false ;
1587- }
1588- }
1589-
15901565 return false ;
15911566 }
15921567
@@ -1676,7 +1651,6 @@ protected function canDeleteShareFromSelf(IShare $share): bool {
16761651 if ($ share ->getShareType () !== IShare::TYPE_GROUP
16771652 && $ share ->getShareType () !== IShare::TYPE_ROOM
16781653 && $ share ->getShareType () !== IShare::TYPE_DECK
1679- && $ share ->getShareType () !== IShare::TYPE_SCIENCEMESH
16801654 ) {
16811655 return false ;
16821656 }
@@ -1713,14 +1687,6 @@ protected function canDeleteShareFromSelf(IShare $share): bool {
17131687 }
17141688 }
17151689
1716- if ($ share ->getShareType () === IShare::TYPE_SCIENCEMESH ) {
1717- try {
1718- return $ this ->getSciencemeshShareHelper ()->canAccessShare ($ share , $ this ->userId );
1719- } catch (ContainerExceptionInterface $ e ) {
1720- return false ;
1721- }
1722- }
1723-
17241690 return false ;
17251691 }
17261692
@@ -1761,7 +1727,6 @@ private function getShareById(string $id): IShare {
17611727 'ocMailShare ' => IShare::TYPE_EMAIL ,
17621728 'ocRoomShare ' => null ,
17631729 'deck ' => IShare::TYPE_DECK ,
1764- 'sciencemesh ' => IShare::TYPE_SCIENCEMESH ,
17651730 ];
17661731
17671732 // Add federated sharing as a provider only if it's allowed
@@ -1875,7 +1840,6 @@ private function getSharesFromNode(string $viewer, $node, bool $reShares): array
18751840 IShare::TYPE_CIRCLE ,
18761841 IShare::TYPE_ROOM ,
18771842 IShare::TYPE_DECK ,
1878- IShare::TYPE_SCIENCEMESH
18791843 ];
18801844
18811845 // Should we assume that the (currentUser) viewer is the owner of the node !?
@@ -2031,9 +1995,6 @@ private function getAllShares(?Node $path = null, bool $reshares = false) {
20311995 // DECK SHARES
20321996 $ deckShares = $ this ->shareManager ->getSharesBy ($ this ->userId , IShare::TYPE_DECK , $ path , $ reshares , -1 , 0 );
20331997
2034- // SCIENCEMESH SHARES
2035- $ sciencemeshShares = $ this ->shareManager ->getSharesBy ($ this ->userId , IShare::TYPE_SCIENCEMESH , $ path , $ reshares , -1 , 0 );
2036-
20371998 // FEDERATION
20381999 if ($ this ->shareManager ->outgoingServer2ServerSharesAllowed ()) {
20392000 $ federatedShares = $ this ->shareManager ->getSharesBy ($ this ->userId , IShare::TYPE_REMOTE , $ path , $ reshares , -1 , 0 );
@@ -2046,7 +2007,7 @@ private function getAllShares(?Node $path = null, bool $reshares = false) {
20462007 $ federatedGroupShares = [];
20472008 }
20482009
2049- return array_merge ($ userShares , $ groupShares , $ linkShares , $ mailShares , $ circleShares , $ roomShares , $ deckShares , $ sciencemeshShares , $ federatedShares , $ federatedGroupShares );
2010+ return array_merge ($ userShares , $ groupShares , $ linkShares , $ mailShares , $ circleShares , $ roomShares , $ deckShares , $ federatedShares , $ federatedGroupShares );
20502011 }
20512012
20522013
0 commit comments