X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/641204dfbdb9fc870cdd2e7f9e3169a44693e7bf..6303b0ef86435d3485965c1f30dc7af3f6b19384:/projects/stargazer/plugins/configuration/rpcconfig/users_methods.cpp?ds=inline diff --git a/projects/stargazer/plugins/configuration/rpcconfig/users_methods.cpp b/projects/stargazer/plugins/configuration/rpcconfig/users_methods.cpp index d6812f55..72fb399e 100644 --- a/projects/stargazer/plugins/configuration/rpcconfig/users_methods.cpp +++ b/projects/stargazer/plugins/configuration/rpcconfig/users_methods.cpp @@ -1,10 +1,13 @@ #include "users_methods.h" +#include "../../../users.h" +#include "../../../admins.h" +#include "../../../tariffs.h" + #include "rpcconfig.h" #include "user_helper.h" #include "user_ips.h" #include "utils.h" - #include "common.h" //------------------------------------------------------------------------------ @@ -221,11 +224,11 @@ USER_HELPER uhelper(u); if (!adminInfo.priviledges.userConf || !adminInfo.priviledges.userPasswd) { - uhelper.SetUserInfo(info, admin, login, *store); + uhelper.SetUserInfo(info, admin, login, *store, tariffs); } else { - uhelper.SetUserInfo(info, admin, login, *store); + uhelper.SetUserInfo(info, admin, login, *store, tariffs); } u->WriteConf(); @@ -382,14 +385,17 @@ if (tariffs->FindByName(tariff)) return; } } - if (u->property.tariffName.Set(tariff, - admin, - login, - store)) + else { - u->WriteConf(); - *retvalPtr = xmlrpc_c::value_boolean(true); - return; + if (u->property.tariffName.Set(tariff, + admin, + login, + store)) + { + u->WriteConf(); + *retvalPtr = xmlrpc_c::value_boolean(true); + return; + } } }