]> git.stg.codes - stg.git/blobdiff - projects/stargazer/plugins/configuration/rpcconfig/users_methods.cpp
У плагіні файлового сховища виправлена втрата файлового дескриптора
[stg.git] / projects / stargazer / plugins / configuration / rpcconfig / users_methods.cpp
index d6812f55235cb9b841fa492bac8781b465df32e9..72fb399e313d204caad6924fb8af551499fb4bbe 100644 (file)
@@ -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;
+            }
         }
     }