From 969d60ab416c075db27f7a0247f0c48ab519afa6 Mon Sep 17 00:00:00 2001 From: Francois Ferrand Date: Fri, 16 Jan 2015 17:08:48 +0100 Subject: Add Json API to create LDAP user. This allows setting up permissions before the LDAP users actually connect to Kanboard, and even importing the permissions from other tools. --- docs/api-json-rpc.markdown | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) (limited to 'docs') diff --git a/docs/api-json-rpc.markdown b/docs/api-json-rpc.markdown index ef013880..184739ad 100644 --- a/docs/api-json-rpc.markdown +++ b/docs/api-json-rpc.markdown @@ -1330,6 +1330,43 @@ Response example: } ``` +### createLdapUser + +- Purpose: **Create a new user authentified by LDAP** +- Parameters: + - **username** (string, optional if email is set) + - **email** (string, optional if username is set) + - **is_admin** Set the value 1 for admins or 0 for regular users (integer, optional) + - **default_project_id** (integer, optional) +- Result on success: **user_id** +- Result on failure: **false** + +The user will only be created if a matching is found on the LDAP server. +Username or email (or both) must be provided. + +Request example: + +```json +{ + "jsonrpc": "2.0", + "method": "createLdapUser", + "id": 1518863034, + "params": { + "username": "biloute", + } +} +``` + +Response example: + +```json +{ + "jsonrpc": "2.0", + "id": 1518863034, + "result": 22 +} +``` + ### getUser - Purpose: **Get user information** -- cgit v1.2.3