Skip to content

fix: stop ignoring certain share rows#7603

Open
salmart-dev wants to merge 1 commit intomainfrom
fix/get-shares-by-path-query-fixes
Open

fix: stop ignoring certain share rows#7603
salmart-dev wants to merge 1 commit intomainfrom
fix/get-shares-by-path-query-fixes

Conversation

@salmart-dev
Copy link
Contributor

@salmart-dev salmart-dev commented Feb 5, 2026

  • Target version: master

Summary

This PR:

  • fixes the ON condition for the join
  • moves join conditions to the ON clause
  • removes an issue where if a user was missing the TYPE_DECK_USER row, the whole share would be missing
  • changes the LIKE query to contain a / to reduce confusion

Will need a backport to the version for NC33

Checklist

  • Code is properly formatted
  • Sign-off message is added to all commits
  • Tests (unit, integration, api and/or acceptance) are included
  • Documentation (manuals or wiki) has been updated or is not required

This PR:
  - fixes the ON condition for the join
  - moves join conditions to the ON clause
  - removes an issue where if a user was missing the TYPE_DECK_USER row,
    the whole share would be missing
  - changes the LIKE query to contain a / to reduce confusion

Signed-off-by: Salvatore Martire <4652631+salmart-dev@users.noreply.github.com>
Copy link
Contributor

@artonge artonge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to change that request too:

$query = $qb->select('*')
->from('share')
->where($qb->expr()->in('parent', $qb->createNamedParameter($ids, IQueryBuilder::PARAM_INT_ARRAY)))
->andWhere($qb->expr()->eq('share_with', $qb->createNamedParameter($userId)))
->andWhere($qb->expr()->orX(
$qb->expr()->eq('item_type', $qb->createNamedParameter('file')),
$qb->expr()->eq('item_type', $qb->createNamedParameter('folder'))
));

I think not as this is already filtering by parent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants