Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
-
None
Description
- Description
Currently, James allows exporting the content of a blob via LinShare.
To do so, we rely on an administrator account that upload & share
- Current behaviour
To do so, we rely on an administrator account that upload & share the blob to the end user.
- Expected result
We should rather rely on "delegation APIs" to do so.
Reuse output of this in your tests...
Configuration inludes (k8s injected) technical user + passwd, James relies on simple auth mechanism upon each request.
- Requirements:
- A delegation account including (uuid/password)
- Steps:
- Get target user uuid (blobs will be uploaded to this user's spaces). For example: user1@linshare.org
GET http://localhost:28080/linshare/webservice/rest/delegation/v2/users/{target-user-mail} -u "delegation-account-uuid:delegation-account-password" 200: Ok, created Not 200: Bad result
Response body:
{ "uuid": "b3684f3c-f239-4826-9dcc-0731f933c6ef", "domain": "e57bb7b8-77b5-4d12-b6bb-a3f6894fcf5f", "firstName": "John", "lastName": "Doe", "mail": "user1@linshare.org", "accountType": "INTERNAL", "external": false }
- Upload directly to user space `My Space`).
Easy, but files structure in user spaces will be messy, an exported blob will be in the same place with bunch of files that users will be uploading.
POST localhost:28080/linshare/webservice/rest/delegation/v2/{target-user-uuid}/documents -u "delegation-account-uuid:delegation-account-password" 200: Ok, created Not 200: Bad result