MXS-2574: Add PATCH for /users/inet endpoint
The alteration of user passwords is now done inside MaxScale. This prevents the possibility of a user locking themselves out.
This commit is contained in:
@ -327,6 +327,13 @@ bool users_find(USERS* users, const char* user)
|
||||
return u->get(user);
|
||||
}
|
||||
|
||||
bool users_change_password(USERS* users, const char* user, const char* password)
|
||||
{
|
||||
Users* u = reinterpret_cast<Users*>(users);
|
||||
UserInfo info;
|
||||
return u->get(user, &info) && u->remove(user) && u->add(user, password, info.permissions);
|
||||
}
|
||||
|
||||
bool users_auth(USERS* users, const char* user, const char* password)
|
||||
{
|
||||
Users* u = reinterpret_cast<Users*>(users);
|
||||
|
Reference in New Issue
Block a user