[BUG] Some improvements in error handling of Sharing feature
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...",
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.",