owncloud / owncloud/android

[BUG] Some improvements in error handling of Sharing feature

Open
#3,697 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Share with users Type:bug
Dominant language
Kotlin
Stars
4.2k
Forks
3.1k
Avg merge
1d 12h
Merged PRs (30d)
7

Description

Change toast for snackbar

  1. Remove device connection
  2. Select to share an item with other user
  3. 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

  1. In server dashboard, enforce password protection for any kind of permission
  2. 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

  1. User A shares an item with user B, only with sharing permissions (edition not granted)
  2. 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

  1. User A shares a folder with user B, only with sharing permissions (edition not granted)
  2. 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

  1. User1 shares txt file with User2 without edit permission
  2. User2 receives the file and try to edit it
  3. User2 saves changes

Current: Unknown error in uploads view
Expected: Permission error

Share twice with same user

  1. Share item with user
  2. 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

  1. In server, enable app Password Policy
  2. Go to admin dashboard > Security and set a policy for links' passwords. For example, set 6 minimum characters and tick it.
  3. 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

  1. In server, enable app Password Policy
  2. Go to admin dashboard > Security and set a policy for links' expiration. For example, set 7 days minimum until links expire if password is set and tick it.
  3. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.