X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/25e5ba1bdfefce82ff8e4bb0221de19a538b4d3c..7df336e60c959c440b2c330f7a7ca9b0251db2a1:/tests/testusers.h?ds=sidebyside diff --git a/tests/testusers.h b/tests/testusers.h index bbf48063..d73c8a79 100644 --- a/tests/testusers.h +++ b/tests/testusers.h @@ -7,6 +7,8 @@ class TEST_USERS : public 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 +23,18 @@ 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; } - int GetUserNum() const { 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; } int OpenSearch() { return 0; } int SearchNext(int /*handle*/, USER_PTR * /*u*/) { return -1; }