Skip to content

[Bug]: A folder that has both a link share and a file request share only appears in "shared by link" #53575

@emberfiend

Description

@emberfiend

⚠️ This issue respects the following points: ⚠️

Bug description

If a folder has both a link share and a file request associated with it, on the left menu, under "Shares", it will only show up in the "Shared by link" category, and not also in "File requests".

Steps to reproduce

Repro video. Invisible cursor but hopefully easy enough to follow.

If you dislike videos:

  1. Add a link share to a folder
  2. Add a file request to the same folder
  3. Look in the "Shares" -> "File requests" folder/group/category in the menu on the left: it is absent

(Not an order of operations thing, it's the same result whichever you do first. Link supersedes file request.)

Expected behavior

The share should appear in both places if both things apply to it.

Nextcloud Server version

master

Operating system

None

PHP engine version

None

Web server

None

Database engine version

None

Is this bug present after an update or on a fresh install?

None

Are you using the Nextcloud Server Encryption module?

None

What user-backends are you using?

  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other

Configuration report

List of activated Apps

Nextcloud Signing status

Nextcloud Logs

Additional info

Also present on NC30, backports would be nice.

Notes from relevant expert, maybe pretty straightforward to fix:

I suspect the fact that we merge and delete duplicates to be the root cause

contents = groupBy(contents, 'source').map((nodes) => {
const node = nodes[0]
node.attributes['share-types'] = nodes.map(node => node.attributes['share-types'])
return node
})

Since we filter out file requests here:

contents: contents.filter((node) => isFileRequest(node.attributes?.['share-attributes'] || [])),

Then the logic would do:

  1. retrieve link/mail shares (mixed with shares that are file request and not)
  2. only the first one is kept (not a file request)
  3. it gets filtered out because not a file request

Metadata

Metadata

Assignees

No one assigned

    Labels

    0. Needs triagePending check for reproducibility or if it fits our roadmap32-feedbackbug

    Type

    Projects

    Status

    🧭 Planning evaluation (don't pick)

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions