Skip to content

[FEATURE REQUEST] Sharing NG: Edit existing link #4970

Closed

Description

@jesmrec

1. Permission:

libre.graph/driveItem/permissions/update

if available, it shows the pencil icon in the rows

2. Edit Link

Same view as the create, with all the fields with the set values

  • Name (optional) -> Max 255 chars
  • Level of permission (mandatory)
  • Password (not always mandatory, depends on capabilities) -> Apply password policy
  • Expiration date (optional)

3. Submission

3.1 name, permission and expiration date:

PATCH https://<url>/graph/v1beta1/drives/<drive-id>/items/<item-id>/permissions/<link-id>

with body

{
    "link": {
        "type": "edit",
        "@libre.graph.displayName": "Tested it"
    },
    "expirationDateTime": "2026-09-27T10:36:00.000Z"
}

including only the changed fields

3.2 Password

POST https://<url>/graph/v1beta1/drives/<drive-id>/items/<item-id>/permissions/<link-id>/setPassword

with body

{
    "password": "<new_pass>"
}

The button to submit with text SAVE

TASKS

  • Research (if needed)
  • Create branch feature/edit_public_link_sharing_ng
  • Development tasks
    • Show pencil button depending on the permission
    • Launch the edit view
    • Implement logic and network operation
    • Implement unit tests (if needed)
  • Code review and apply changes requested
  • Design test plan
  • QA
  • Merge branch feature/edit_public_link_sharing_ng into master

Activity

  1. added this to the 4.9 - Current milestone on Sep 4, 2026
  2. self-assigned this
    on Nov 3, 2026
  3. joragua commented on Nov 4, 2026

    @joragua
    Member

    Problem

    The Sharing NG flow does not allow users to edit 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 change their name, permission type, password or expiration date. Users must use another client (e.g. the web app) to edit links.


    Desired behavior

    When a user opens the sharing panel for a file or folder and holds the required permission, a pencil icon is shown on each entry in the PUBLIC LINKS section. Tapping it opens an edit view — the same view used for creation — with every field pre-filled with the link's current values. The user can change the link name, permission type, password and expiration date. On confirmation (SAVE), the changes are sent to the server and the updated link is reflected in the PUBLIC LINKS list.


    User stories

    • As a user, I want to tap a pencil icon on a public link entry to edit it.
    • As a user, I want to see all fields pre-filled with the link's current values when I open the edit view.
    • As a user, I want to change the link name, so I can rename it later.
    • As a user, I want to change the permission level for the link, so I can control what recipients can do.
    • As a user, I want to set, change or remove the link's expiration date.
    • As a user, I want to set or change the link's password, enforced when the server requires it for the selected permission type.
    • As a user, I want to see the edited link reflected in the list immediately after saving.

    Constraints


    Acceptance criteria

    • The pencil icon is visible on a public link entry only when the user has libre.graph/driveItem/permissions/update permission on the item.
    • Tapping the pencil icon opens an edit view identical to the creation view, with name, permission selector, password field and expiration date field all pre-filled with the link's current values.
    • The permission selector shows Can view and Can edit for files. Can view, Can edit, and Secret file drop for folders.
    • Only changed fields (type, displayName, expirationDateTime) are sent in the PATCH request body.
    • Password is required (and the form cannot be submitted without it) when server capabilities mandate it for the selected permission type, following the password policy.
    • A changed password is sent through a separate setPassword request.
    • Expiration date is optional; when set it is sent as ISO 8601 in the request body.
    • The submit button is labelled SAVE.
    • On success, the PUBLIC LINKS list is refreshed from the server to reflect the edited link.
    • On network or server error, an error message is shown and the edit view remains open.

    Out of scope


    Assumptions

    • 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/update permission check can be derived from the same Graph API permissions response already used to populate the sharing panel.

    • The link name has a maximum of 255 characters.

    • The create-link UI (issue [FEATURE REQUEST] Sharing NG: Create new link #4955) already exists and its edit/bottom sheet pattern is reusable — the edit view is the same view with fields pre-filled.

    • The endpoints for link editing are:

      • PATCH /graph/v1beta1/drives//items//permissions/ (name, permission, expiration date)
      • POST /graph/v1beta1/drives//items//permissions//setPassword (password)
    • PATCH request body fields (only the changed ones are included):

      Field Type Notes
      link.type String view, edit, or createOnly
      [email protected] String Link name, max 255 chars
      expirationDateTime String (ISO 8601) Optional; omit if not changed
    • The password is updated in a separate setPassword request with body { "password": "<new_pass>" }.

    • Password is mandatory when OCIS_SHARING_PUBLIC_WRITEABLE_SHARE_MUST_HAVE_PASSWORD is set and the selected permission is Can edit or Secret file drop.

    • Password is mandatory for all permission types when OCIS_SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD is set.

    • The password policy validation (which permissions require a password) must read from the server capabilities already fetched at login/session time — no additional network call needed.

    • Permission type labels (Can edit, Can view, Secret file drop) are hardcoded and translated, matching the pattern from link creation. Can edit, Can view for all, Secret file drop only for folders.

    • Permission type labels with subtitle: "Can view" -> "View, Download". "Can edit" -> "View, upload, edit, download, delete". "Secret file drop" -> "Upload only, existing content is not revealed".


    Implementation notes

  4. linked a pull request that will close this issuefeat: edit a public link on an oCIS server #5044on Nov 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions