Skip to content

[Bug]: Rejecting a Remote Share is not possible #51219

Open
@kesselb

Description

@kesselb

Bug description

Remote shares are listed under Shares → Pending Shares.

In Nextcloud 29, rejecting a remote share with is not possible.

Steps to reproduce

  1. Have instanceA and instanceB
  2. Alice (instanceA) shares a folder "Pizza with Pineapple" with Bob (instanceB).
  3. Bob (instanceB) tries to reject the share for obvious reasons. 😉
  4. Bob gets an error message saying the rejection failed—now wondering if the admin has joined the "Pineapple belongs on pizza" team. 🍍🍕
Screencast.From.2025-03-04.11-31-55.webm

Expected behavior

It should be possible to reject a pending share.

Image

Also weird that the share name is shown with }}, even if the original share name did not contain them.

Additional info

The issue appears to be in rejectShareAction.ts, which likely needs an update to handle pending shares differently:

const url = generateOcsUrl('apps/files_sharing/api/v1/{shareBase}/{id}', {
shareBase: isRemote ? 'remote_shares' : 'shares',
id: node.attributes.id,
})

  • To remove a pending share, the DELETE request should go to: apps/files_sharing/api/v1/{shareBase}/pending/{id} (RemoteController.declineShare)

  • Currently, the DELETE request goes to: apps/files_sharing/api/v1/{shareBase}/{id} (RemoteController.unshare)

The unshare method only works for removing an existing share (one that has already been mounted), not for pending shares.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions