MXS-1220: Add /users/ resource
The /users/ resource shows all user accounts that can be used with MaxScale. This resource is further split into two resource collections, /users/inet and /users/unix, which contain the network users and Linux accounts respectively.
This commit is contained in:
@ -137,9 +137,19 @@ json_t* mxs_json_self_link(const char* host, const char* path, const char* id)
|
||||
json_t* links = json_object();
|
||||
|
||||
string self = host;
|
||||
self += "/";
|
||||
|
||||
if (path[0] != '/')
|
||||
{
|
||||
self += "/";
|
||||
}
|
||||
|
||||
self += path;
|
||||
self += "/";
|
||||
|
||||
if (self[self.length() - 1] != '/')
|
||||
{
|
||||
self += "/";
|
||||
}
|
||||
|
||||
self += id;
|
||||
json_object_set_new(links, CN_SELF, json_string(self.c_str()));
|
||||
|
||||
|
Reference in New Issue
Block a user