MXS-1354: Add user authorization to maxadmin

All commands that modify the internal state of MaxScale now require admin
level authorization.
This commit is contained in:
Markus Mäkelä
2017-08-16 14:29:58 +03:00
parent 9f81f0775f
commit 828649ba99
5 changed files with 66 additions and 6 deletions

View File

@ -191,7 +191,7 @@ bool do_auth(MHD_Connection* connection, const char* url, const char* method)
send_auth_error(connection);
rval = false;
}
else if (!admin_is_admin_user(user) && modifies_data(connection, method))
else if (!admin_user_is_inet_admin(user) && modifies_data(connection, method))
{
if (config_get_global_options()->admin_log_auth_failures)
{