@@ -270,15 +270,15 @@ private function createShareObject(array $data): IShare {
270270
271271 private function applyBoardPermission ($ share , $ permissions , $ userId ) {
272272 try {
273- $ this ->permissionService ->checkPermission ($ this ->cardMapper , $ share ->getSharedWith (), Acl::PERMISSION_EDIT , $ userId );
273+ $ this ->permissionService ->checkPermission ($ this ->cardMapper , $ share ->getSharedWith (), Acl::PERMISSION_EDIT , $ userId, true );
274274 } catch (NoPermissionException $ e ) {
275275 $ permissions &= Constants::PERMISSION_ALL - Constants::PERMISSION_UPDATE ;
276276 $ permissions &= Constants::PERMISSION_ALL - Constants::PERMISSION_CREATE ;
277277 $ permissions &= Constants::PERMISSION_ALL - Constants::PERMISSION_DELETE ;
278278 }
279279
280280 try {
281- $ this ->permissionService ->checkPermission ($ this ->cardMapper , $ share ->getSharedWith (), Acl::PERMISSION_SHARE , $ userId );
281+ $ this ->permissionService ->checkPermission ($ this ->cardMapper , $ share ->getSharedWith (), Acl::PERMISSION_SHARE , $ userId, true );
282282 } catch (NoPermissionException $ e ) {
283283 $ permissions &= Constants::PERMISSION_ALL - Constants::PERMISSION_SHARE ;
284284 }
@@ -747,6 +747,8 @@ public function getSharedWith($userId, $shareType, $node, $limit, $offset): arra
747747 $ qb ->expr ()->eq ('s.item_type ' , $ qb ->createNamedParameter ('folder ' ))
748748 ));
749749
750+ $ qb ->andWhere ($ qb ->expr ()->eq ('dc.deleted_at ' , $ qb ->createNamedParameter (0 , IQueryBuilder::PARAM_INT )));
751+
750752 $ cursor = $ qb ->execute ();
751753 while ($ data = $ cursor ->fetch ()) {
752754 if (!$ this ->isAccessibleResult ($ data )) {
0 commit comments