[Bug] Reshare dialog offers Edit/Create/Delete from a read-only source, causing a "Cannot increase permissions" error
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 36.9k
- Forks
- 5.2k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 713
Description
Steps to reproduce
- As user A, share a folder with user B using Read + Share only (no edit/create/delete).
- As user B, open the share dialog and reshare that folder (to a Team, or to another user).
- In permissions, note that Edit is offered and enabled (the dialog starts at full permissions).
- Leave Edit enabled and save.
Expected
User B can only reshare with the permissions they hold (read + share). Edit / Create / Delete should be disabled or hidden, since B can't grant them.
Actual
The share is rejected with Cannot increase permissions of <path>. B is offered a toggle they can't actually use and only learns that from a backend error.
Suggested fix
Clamp the default and selectable permissions to fileInfo.sharePermissions when resharing, so a read-only resharer can't pick edit/create/delete. Keep the backend guard as the safety net.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the reshare dialog and trace how its permission controls and defaults use fileInfo.sharePermissions; then review the backend permission guard mentioned in the issue. Done means a user with only Read + Share cannot select Edit/Create/Delete when resharing, while the backend guard still rejects invalid permission increases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, php
- Domain
- authorization, backend, frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 68/100