git.stg.codes
/
stg.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Ticket 26. The const MODULE_SETTINGS & ms parameter added to the
[stg.git]
/
tests
/
testusers.h
diff --git
a/tests/testusers.h
b/tests/testusers.h
index 1250ae496b33ae6a5da19d6292c3f0318351d239..131fb9b6d06abf65c71efb8c8d41c26ea8447535 100644
(file)
--- a/
tests/testusers.h
+++ b/
tests/testusers.h
@@
-1,13
+1,19
@@
#ifndef __TEST_USERS_H__
#define __TEST_USERS_H__
#ifndef __TEST_USERS_H__
#define __TEST_USERS_H__
+#include "stg/users.h"
+
class TEST_USERS : public USERS {
public:
TEST_USERS() {}
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*/, 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; }
+ bool TariffInUse(const std::string & /*tariffName*/) const
+ { return -1; }
void AddNotifierUserAdd(NOTIFIER_BASE<USER_PTR> * /*notifier*/) {}
void DelNotifierUserAdd(NOTIFIER_BASE<USER_PTR> * /*notifier*/) {}
void AddNotifierUserAdd(NOTIFIER_BASE<USER_PTR> * /*notifier*/) {}
void DelNotifierUserAdd(NOTIFIER_BASE<USER_PTR> * /*notifier*/) {}
@@
-15,14
+21,23
@@
class TEST_USERS : public USERS {
void AddNotifierUserDel(NOTIFIER_BASE<USER_PTR> * /*notifier*/) {}
void DelNotifierUserDel(NOTIFIER_BASE<USER_PTR> * /*notifier*/) {}
void AddNotifierUserDel(NOTIFIER_BASE<USER_PTR> * /*notifier*/) {}
void DelNotifierUserDel(NOTIFIER_BASE<USER_PTR> * /*notifier*/) {}
- int Add(const std::string & /*login*/, const ADMIN * /*admin*/) { return 0; }
+ int Add(const std::string & /*login*/, const ADMIN * /*admin*/)
+ { return 0; }
void Del(const std::string & /*login*/, const ADMIN * /*admin*/) {}
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 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; }
+ int FindByIPIdx(uint32_t /*ip*/, USER_PTR * /*user*/) const
+ { return -1; }
bool IsIPInIndex(uint32_t /*ip*/) const { return false; }
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; }
int OpenSearch() { return 0; }
int SearchNext(int /*handle*/, USER_PTR * /*u*/) { return -1; }