-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Description
Every space has a representative image as presentation. The app should be able to offer users the ability of changing the space image.
AC:
-
New option in the bottom menu:
Edit image. Permission level required to perform the action:"libre.graph/driveItem/permissions/update",. Available ingraph/v1beta1/drives/<drive-id>/root/permissionsendpoint. As checked in the web, only spacemanagerusers seem to be able to edit the image, regardless the platform role. -
By choosing that option, the user can pick an image from the system to be set as space image. Only one
-
The selected image will be pushed to the server to the folder
/dav/spaces/<drive-id>/.space/, by using an authenticatedPUTrequest, adding the image content to the payload. -
Once pushed, a
PATCHoperation tograph/v1.0/drives/<drive-id>needed to set the pushed image as space image. ThePATCHrequest will include in the payload:
{
"special": [
{
"id": "<file-id>",
"specialFolder": {
"name": "<file-name>"
}
}
]
}
- The accepted image formats are:
JPEG,JPG,PNG,BMPandGIF - Errors: regular errors (connection, server unreachable...).
Extra ball: set an emoji as image
TASKS
- Research (if needed)
- Create branch feature/update_space_image
- Development tasks
- Add a menu option to update the space image
- Open SAF with some restrictions: only images and multi-selection not allowed
- Upload the chosen file to
/.spacedirectory - Update the space image using the
PATCHoperation tograph/v1.0/drives/<drive-id> - ...
- Implement unit tests (if needed)
- Code review and apply changes requested
- Design test plan
- QA
- Merge branch feature/update_space_image into master