[BUG] Some improvements in error handling of Sharing feature
Nobody has claimed this yet.
- Dominant language
- Kotlin
- Stars
- 4.2k
- Forks
- 3.1k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 7
Description
Change toast for snackbar
- Remove device connection
- Select to share an item with other user
- Enter username of recipient
Current: Error message in a toast
Expected: Error message in a snackbar (as every error all around the app)
Enforced password
- In server dashboard, enforce password protection for any kind of permission
- Create a public link, letting empty the (mandatory) password
Current: It was not posible to share this file or folder because server could not be reached
Expected: Password mandatory, You must enter a password (or similar). Server responds with 404 and "message": "Cannot set the requested share permissions for...",
Privileges inheritance
- User A shares an item with user B, only with sharing permissions (edition not granted)
- User B shares with C, trying to grant edit permissions
Current: It was not possible to update this file or folder because it was not found
Expected: Permissions error (or similar). Server responds with 404 and "message": "Cannot set the requested share permissions for...",
Privileges inheritance II
- User A shares a folder with user B, only with sharing permissions (edition not granted)
- User B creates a link over the folder with permission
Download/View/Upload
Current: It was not possible to update this file or folder because it was not found
Expected: Permissions error (or similar). Server responds with 404 and "message": "Cannot set the requested share permissions for...",
Privileges inheritance III
- User1 shares txt file with User2 without edit permission
- User2 receives the file and try to edit it
- User2 saves changes
Current: Unknown error in uploads view
Expected: Permission error
Share twice with same user
- Share item with user
- Try to share the same item with same user
Current: Error displayed: It was not posible to unshare this file or folder because server could not be reached
Expected: More accurate error
Password policy
- In server, enable app
Password Policy - Go to admin dashboard > Security and set a policy for links' passwords. For example, set
6 minimum charactersand tick it. - Create a public link with a password length lower than 6 (or any other way that does not match the policy to force an error)
Current: It was not posible to share this file or folder because server could not be reached
Expected: Password does not match the policy (or similar). Server responds 403 and "message": "The password is too short. At least 6 characters are required.",
Expiration policy
- In server, enable app
Password Policy - Go to admin dashboard > Security and set a policy for links' expiration. For example, set
7 days minimum until links expire if password is setand tick it. - Create a public link with a password and an expiration date later than 7 days.
Current: It was not posible to share this file or folder because server could not be reached
Expected: Expiration does not match the policy (or similar). Server responds 403 and "message": "The expiration date cannot exceed 7 days.",
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 by reproducing the listed sharing, permission, password, and expiration-policy scenarios in the Android app, then trace how the client handles the server's 404 and 403 responses. Done means each scenario shows an accurate permission or policy error, with the connection-related cases displayed in a snackbar where specified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, kotlin
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100