MXS-1354: Add user account types to REST API

The user accounts can now be created with a specific account type. This
allows read-only users to be created for the REST API.
This commit is contained in:
Markus Mäkelä
2017-08-16 06:29:46 +03:00
parent ec045b7ab6
commit 9d24a63c10
9 changed files with 108 additions and 119 deletions

View File

@ -179,4 +179,22 @@ void users_diagnostic(DCB* dcb, USERS* users);
*/
json_t* users_diagnostic_json(USERS* users);
/**
* Convert account_type to a string
*
* @param type Enum value
*
* @return String representation of @c type
*/
const char* account_type_to_str(enum account_type type);
/**
* Convert JSON value to account_type value
*
* @param json JSON value to convert
*
* @return Enum value of @c json
*/
enum account_type json_to_account_type(json_t* json);
MXS_END_DECLS