X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/d3994fde00a92cffd43c79668802108d3056413b..6e9413c7f9395b3bf0c56ed123e76f32904e3773:/tests/testusers.h?ds=inline diff --git a/tests/testusers.h b/tests/testusers.h index 780d0dd9..131fb9b6 100644 --- a/tests/testusers.h +++ b/tests/testusers.h @@ -1,12 +1,16 @@ #ifndef __TEST_USERS_H__ #define __TEST_USERS_H__ +#include "stg/users.h" + class TEST_USERS : public USERS { public: TEST_USERS() {} int FindByName(const std::string & /*login*/, USER_PTR * /*user*/) { return -1; } + int FindByName(const std::string & /*login*/, CONST_USER_PTR * /*user*/) const + { return -1; } bool TariffInUse(const std::string & /*tariffName*/) const { return -1; } @@ -21,12 +25,19 @@ class TEST_USERS : public USERS { { return 0; } void Del(const std::string & /*login*/, const ADMIN * /*admin*/) {} + bool Authorize(const std::string &, uint32_t, uint32_t, const AUTH *) + { return false; } + bool Unauthorize(const std::string &, const AUTH *, const std::string &) + { return false; } + int ReadUsers() { return 0; } virtual size_t Count() const { return 0; }; int FindByIPIdx(uint32_t /*ip*/, USER_PTR * /*user*/) const { return -1; } bool IsIPInIndex(uint32_t /*ip*/) const { return false; } + bool IsIPInUse(uint32_t, const std::string &, CONST_USER_PTR *) const { return false; } + bool Exists(const std::string &) const { return false; } int OpenSearch() { return 0; } int SearchNext(int /*handle*/, USER_PTR * /*u*/) { return -1; }