Nguyễn Việt Đức created JAMES-3039:
--------------------------------------
Summary: Provision a LinShare technical user within James
"LinShare testing" tooling
Key: JAMES-3039
URL: https://issues.apache.org/jira/browse/JAMES-3039
Project: James Server
Issue Type: Improvement
Reporter: Nguyễn Việt Đức
The LinShare shipped in James should have a preprovision "james" technical
account able to perform uploads.
# Requirements:
- A Linshare backend instance (or docker linshare backend)
- An administrator account (default is
[email protected]/adminlinshare)
# Steps:
- Send a POST request with the body containing the custom name & mail of the
delegation account
{code:java}
POST http://localhost:28080/linshare/webservice/rest/admin/technical_accounts
-u "[email protected]:adminlinshare"
200: Ok, created
Not 200: Bad result
{code}
{code:java}
json
{
"name":"delegation",
"mail":"[email protected]",
"password":"secret",
"enable":"true",
"role":"DELEGATION"
}
{code}
Reponse body:
{code:java}
json
{ "uuid": "8be85afc-5e7d-41c8-8b8f-1ee6db0d392b", "creationDate":
1568084857046, "modificationDate": 1568084857046, "locale": null,
"externalMailLocale": null, "domain": "LinShareRootDomain", "password": "",
"enable": true, "name": "Delegation", "mail":
"82f6eb74-8ab6-4b6a-9ece-12ec81c8ca88", "permissions": [], "role": "DELEGATION"
} \{code}
- Grant necessary permissions to the delegation account
{code:java}
PUT [http://localhost:28080/linshare/webservice/rest/admin/technical_accounts]
-u "[email protected]:adminlinshare"
200: Ok, created
Not 200: Bad result
{code}
{code:java}json
{
"uuid": "uuid-delegation-account",
"mail": "mail-delegation-account(UUID)",
"name": "Delegation",
"permissions": ["DOCUMENT_ENTRIES_CREATE"]
}
{code}
Response body:
{code:java}json
{
"uuid": "8be85afc-5e7d-41c8-8b8f-1ee6db0d392b",
"creationDate": 1568084857046,
"modificationDate": 1568085050411,
"locale": null,
"externalMailLocale": null,
"domain": "LinShareRootDomain",
"password": "",
"enable": false,
"name": "Delegation",
"mail": "82f6eb74-8ab6-4b6a-9ece-12ec81c8ca88",
"permissions": ["DOCUMENT_ENTRIES_CREATE"],
"role": "DELEGATION"
}
{code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]