You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if available, it shows the trashbin icon in the rows
By clicking the trashbin icon, a dialog will appear asking for confirmation. In case of confirmation, the link will be deleted and the list updated without the removed link
The Sharing NG flow does not allow users to remove existing public links for files and folders from the Android client. When a user opens the sharing panel, the PUBLIC LINKS section is read-only: existing links are listed but there is no way to delete them. Users must use another client (e.g. the web app) to remove a link they no longer want to keep.
Desired behavior
When a user opens the sharing panel for a file or folder and holds the required permission, a trashbin icon is shown on each entry in the PUBLIC LINKS section. Tapping it opens a confirmation dialog. On confirmation, the link is deleted on the server and the PUBLIC LINKS list is updated without the removed link. On cancellation, nothing happens and the dialog is dismissed.
User stories
As a user, I want to tap a trashbin icon on a public link entry to remove it.
As a user, I want to be asked for confirmation before a link is deleted, so I don't remove a link by accident.
As a user, I want the link to disappear from the PUBLIC LINKS list immediately after deletion, so I can trust what I see.
As a user, I only want to see the trashbin icon when I'm actually allowed to delete the link.
Constraints
Acceptance criteria
The trashbin icon is visible on a public link entry only when the user has libre.graph/driveItem/permissions/delete permission on the item.
Tapping the trashbin icon opens a confirmation dialog asking the user to confirm the deletion of the link.
On confirmation, a DELETE request is sent to the server for the selected link.
On cancellation, the dialog is dismissed and no request is sent.
On success, the PUBLIC LINKS list is refreshed so the removed link no longer appears.
On network or server error, an error message is shown and the link remains in the list.
The deletion affects only the targeted link; other public links and member shares are left untouched.
The item's drive-id and item-id are available in the sharing panel context.
The link-id is available from the existing links list already shown in the sharing panel.
The libre.graph/driveItem/permissions/delete permission check can be derived from the same Graph API permissions response already used to populate the sharing panel (the member-share delete icon already uses this exact capability).
The create-link / member-share UI already exists and its confirmation-dialog pattern is reusable — the delete confirmation is the same dialog used for member-share removal.
The endpoint for link deletion is:
DELETE /graph/v1beta1/drives/<drive-id>/items/<item-id>/permissions/<link-id> with an empty body.
No request body is needed; a successful DELETE returns no content.
Implementation notes
The backend stack for removing a public link already exists end to end — only the UI wiring in the sharing panel is missing.
Already present (no changes expected, verify only):
Use case: RemoveLinkUseCase (owncloudDomain/.../domain/links/usecases/RemoveLinkUseCase.kt), Params(accountName, spaceId, linkId).
ViewModel: PublicLinksViewModel already exposes removePublicLink(linkId) and removeLinkResultFlow.
Missing UI wiring (the work for this issue):
GraphShareFragment.showLinks() currently calls setPublicLinks(..., canRemoveLinks = false, canEditLinks = false) with the flag hardcoded to false. Pass canRemoveLinks = canRemoveShares (the libre.graph/driveItem/permissions/delete capability already computed in checkPermissions() via DRIVES_DELETE_PERMISSION) so the trashbin icon shows when allowed.
GraphShareFragment.onRemovePublicLink(...) is currently an empty stub. Implement it to show a confirmation dialog (mirroring onRemoveShare(...) used for member shares) and, on confirmation, call publicLinksViewModel.removePublicLink(id).
Observe publicLinksViewModel.removeLinkResultFlow in subscribeToViewModels() (currently not observed): on success refresh the public links list; on error show an error message.
PublicLinksAdapter already has the removePublicLinkButton gated by canRemoveLinks, so no adapter change is expected beyond the flag.
Verify before implementing:
RemoveRemoteLinkOperation currently targets graph/v1beta1/drives/{spaceId}/root/permissions/{linkId}, whereas the member-share delete (RemoveRemoteGraphShareOperation) targets drives/{spaceId}/items/{itemId}/permissions/{shareId}. Confirm the root/permissions path works for non-root items; if not, align it with the items/{itemId}/permissions/{linkId} form described above.
Reference implementation to follow: the member-share removal flow (RemoveGraphShareAsyncUseCase → GraphShareViewModel.removeGraphShare(shareId) → GraphShareFragment.onRemoveShare(...) confirmation dialog) is the exact parallel for public links.
Activity
joragua commentedon Nov 6, 2026
Problem
The Sharing NG flow does not allow users to remove existing public links for files and folders from the Android client. When a user opens the sharing panel, the PUBLIC LINKS section is read-only: existing links are listed but there is no way to delete them. Users must use another client (e.g. the web app) to remove a link they no longer want to keep.
Desired behavior
When a user opens the sharing panel for a file or folder and holds the required permission, a trashbin icon is shown on each entry in the PUBLIC LINKS section. Tapping it opens a confirmation dialog. On confirmation, the link is deleted on the server and the PUBLIC LINKS list is updated without the removed link. On cancellation, nothing happens and the dialog is dismissed.
User stories
Constraints
Acceptance criteria
libre.graph/driveItem/permissions/deletepermission on the item.DELETErequest is sent to the server for the selected link.Out of scope
Assumptions
libre.graph/driveItem/permissions/deletepermission check can be derived from the same Graph API permissions response already used to populate the sharing panel (the member-share delete icon already uses this exact capability).DELETE /graph/v1beta1/drives/<drive-id>/items/<item-id>/permissions/<link-id>with an empty body.DELETEreturns no content.Implementation notes
The backend stack for removing a public link already exists end to end — only the UI wiring in the sharing panel is missing.
Already present (no changes expected, verify only):
RemoveLinkUseCase(owncloudDomain/.../domain/links/usecases/RemoveLinkUseCase.kt),Params(accountName, spaceId, linkId).LinksRepository.removeLink(accountName, spaceId, linkId)+OCLinksRepository.removeLink(...).RemoteLinksDataSource.removeLink(...)+OCRemoteLinksDataSource.removeLink(...)→getLinksService(accountName).removeLink(spaceId, linkId).OCLinksService.removeLink→RemoveRemoteLinkOperation.PublicLinksViewModelalready exposesremovePublicLink(linkId)andremoveLinkResultFlow.Missing UI wiring (the work for this issue):
GraphShareFragment.showLinks()currently callssetPublicLinks(..., canRemoveLinks = false, canEditLinks = false)with the flag hardcoded tofalse. PasscanRemoveLinks = canRemoveShares(thelibre.graph/driveItem/permissions/deletecapability already computed incheckPermissions()viaDRIVES_DELETE_PERMISSION) so the trashbin icon shows when allowed.GraphShareFragment.onRemovePublicLink(...)is currently an empty stub. Implement it to show a confirmation dialog (mirroringonRemoveShare(...)used for member shares) and, on confirmation, callpublicLinksViewModel.removePublicLink(id).publicLinksViewModel.removeLinkResultFlowinsubscribeToViewModels()(currently not observed): on success refresh the public links list; on error show an error message.PublicLinksAdapteralready has theremovePublicLinkButtongated bycanRemoveLinks, so no adapter change is expected beyond the flag.Verify before implementing:
RemoveRemoteLinkOperationcurrently targetsgraph/v1beta1/drives/{spaceId}/root/permissions/{linkId}, whereas the member-share delete (RemoveRemoteGraphShareOperation) targetsdrives/{spaceId}/items/{itemId}/permissions/{shareId}. Confirm theroot/permissionspath works for non-root items; if not, align it with theitems/{itemId}/permissions/{linkId}form described above.Reference implementation to follow: the member-share removal flow (
RemoveGraphShareAsyncUseCase→GraphShareViewModel.removeGraphShare(shareId)→GraphShareFragment.onRemoveShare(...)confirmation dialog) is the exact parallel for public links.