Skip to content

fix(files_sharing): Hide incompatible actions in shares - #60151

Merged
nfebe merged 2 commits into
masterfrom
fix/pending-shares-hide-incompatible-actions
Jun 17, 2026
Merged

fix(files_sharing): Hide incompatible actions in shares#60151
nfebe merged 2 commits into
masterfrom
fix/pending-shares-hide-incompatible-actions

Conversation

@nfebe

@nfebenfebe commented May 4, 2026

Copy link
Copy Markdown
Contributor

Pending and deleted share entries are not mounted into the user's filesystem, so generic file operations like delete or download cannot succeed and produce a misleading "file is not available" error.

These views now expose only the actions that actually apply: accept and reject for pending shares; restore for deleted shares. All other views continue to show every registered action.

@nfebe
nfebe requested review from a team and skjnldsv as code ownersMay 4, 2026 20:42
@nfebe
nfebe requested review from susnux and szaimen and removed request for a teamMay 4, 2026 20:42
@nfebe
nfebeforce-pushed the fix/pending-shares-hide-incompatible-actions branch 2 times, most recently from 1245b96 to ad38f46CompareMay 4, 2026 20:43
@nfebe
nfebe marked this pull request as draft May 4, 2026 20:44

@susnuxsusnux left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

this should be handled by the actions in question in the enabled callback of the action itself.

We designed the API so that the files app does not need to know about internals of actions to detangle this logic.
That is why our API now works for so long very well. So the files app itself should not need to know about when something can be downloaded or not. This is the task of the action itself.

@nfebe
nfebeforce-pushed the fix/pending-shares-hide-incompatible-actions branch from ad38f46 to c73b63cCompareMay 5, 2026 10:05
@nfebe

nfebe commented May 5, 2026

Copy link
Copy Markdown
ContributorAuthor

this should be handled by the actions in question in the enabled callback of the action itself.

We designed the API so that the files app does not need to know about internals of actions to detangle this logic.
That is why our API now works for so long very well. So the files app itself should not need to know about when something can be downloaded or not. This is the task of the action itself.

Approach has been changed but we then we have to remember do this on all actions.

@nfebe
nfebe requested a review from susnuxMay 12, 2026 15:58
@nfebe
nfebeforce-pushed the fix/pending-shares-hide-incompatible-actions branch from c73b63c to 7e4f4cbCompareMay 12, 2026 15:58
@nfebe
nfebe marked this pull request as ready for review May 12, 2026 15:58
Comment threadapps/files/src/actions/deleteAction.ts Outdated
Comment threadapps/files/src/actions/downloadAction.ts Outdated

@susnuxsusnux left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think the proper fix for most cases (and also for e.g. 3rdparty actions provided by community apps) is to properly set the permissions.
In the pendingshares and deletedshares the returned nodes should not have READ, UPDATE or DELETE permissions then, no?

@susnuxsusnux added the bug label May 19, 2026
@nfebe
nfebeforce-pushed the fix/pending-shares-hide-incompatible-actions branch from 7e4f4cb to 272a8e8CompareJune 3, 2026 16:12
@nfebe
nfebe requested a review from susnuxJune 3, 2026 16:14
@susnuxsusnux added this to the Nextcloud 35 milestone Jun 9, 2026
@nfebe
nfebeforce-pushed the fix/pending-shares-hide-incompatible-actions branch from 272a8e8 to ce09dbcCompareJune 12, 2026 09:26
@nfebe

Copy link
Copy Markdown
ContributorAuthor

/compile

… shares
Pending and deleted shares are not mounted into the user's filesystem, so
generic file operations like delete or download produced a misleading
"file is not available" error.
These shares now carry no permissions, so every permission-aware action
hides itself automatically, without the files app having to special-case
each view. Conversion additionally requires read permission, matching the
server-side readability check.
Signed-off-by: nfebe <fenn25.fn@gmail.com>
@nfebe
nfebeforce-pushed the fix/pending-shares-hide-incompatible-actions branch from da6c1fe to 0632913CompareJune 17, 2026 11:37
@nfebe

Copy link
Copy Markdown
ContributorAuthor

/compile

Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
@nfebe
nfebe merged commit 13adaf9 into masterJun 17, 2026
134 checks passed
@nfebe
nfebe deleted the fix/pending-shares-hide-incompatible-actions branch June 17, 2026 17:26
@nfebe

Copy link
Copy Markdown
ContributorAuthor

/backport to stable34

@nfebe

Copy link
Copy Markdown
ContributorAuthor

/backport to stable33

Sign up for freeto 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.

4 participants

@nfebe@susnux@pringelmann@nextcloud-command