@@ -79,12 +79,10 @@ public function __construct(
7979 * @throws InternalError
8080 * @return Share[]
8181 */
82- public function findAll (string $ nodeType , int $ nodeId , ?string $ userId = null , bool $ enhanceShares = true ): array {
83- $ userId = $ this ->permissionsService ->preCheckUserId ($ userId );
84-
82+ public function findAll (string $ nodeType , int $ nodeId , bool $ enhanceShares = true ): array {
8583 try {
8684 $ excluded = !$ this ->circleHelper ->isCirclesEnabled () ? [ShareReceiverType::CIRCLE ] : [];
87- $ shares = $ this ->mapper ->findAllSharesForNode ($ nodeType , $ nodeId , $ userId , $ excluded );
85+ $ shares = $ this ->mapper ->findAllSharesForNode ($ nodeType , $ nodeId , $ excluded );
8886
8987 return $ enhanceShares ? $ this ->addReceiverDisplayNames ($ shares ) : $ shares ;
9088 } catch (Exception $ e ) {
@@ -920,7 +918,7 @@ public function deleteAllForContext(Context $context): void {
920918 * @return Share[]
921919 */
922920 public function changeSenderForNode (string $ nodeType , int $ nodeId , string $ newOwnerUserId , ?string $ userId = null ): array {
923- $ sharesForTable = $ this ->findAll ($ nodeType , $ nodeId , $ userId , false );
921+ $ sharesForTable = $ this ->findAll ($ nodeType , $ nodeId , false );
924922 $ newShares = [];
925923
926924 foreach ($ sharesForTable as $ share ) {
@@ -982,7 +980,7 @@ public function transferSharesForContext(int $contextId, string $newOwnerId, str
982980 */
983981 public function findSharedWithUserIds (int $ elementId , string $ elementType ): array {
984982 try {
985- $ shares = $ this ->mapper ->findAllSharesForNode ($ elementType , $ elementId, '' );
983+ $ shares = $ this ->mapper ->findAllSharesForNode ($ elementType , $ elementId );
986984 $ sharedWithUserIds = [];
987985
988986 foreach ($ shares as $ share ) {
0 commit comments