mirror of
https://github.com/Relintai/rcpp_framework.git
synced 2024-11-14 04:57:21 +01:00
Added load_all virtual to UserManager. Also added set_path to FileBasedUserManager.
This commit is contained in:
parent
fb5a059e2e
commit
11d1d7327a
@ -6,6 +6,7 @@
|
||||
#include <rapidjson/writer.h>
|
||||
#include <tinydir/tinydir.h>
|
||||
#include <cstdio>
|
||||
#include "user_manager.h"
|
||||
|
||||
std::string FileBasedUser::get_path() {
|
||||
return _path;
|
||||
@ -114,6 +115,10 @@ void FileBasedUser::load() {
|
||||
register_sessions();
|
||||
}
|
||||
|
||||
void FileBasedUser::load_all() {
|
||||
|
||||
}
|
||||
|
||||
FileBasedUser::FileBasedUser() :
|
||||
User() {
|
||||
}
|
||||
|
@ -12,6 +12,8 @@ public:
|
||||
void load(const std::string &p_name);
|
||||
void load();
|
||||
|
||||
static void load_all();
|
||||
|
||||
FileBasedUser();
|
||||
~FileBasedUser();
|
||||
|
||||
|
@ -8,6 +8,14 @@ User *FileBasedUserManager::create_user() {
|
||||
return u;
|
||||
}
|
||||
|
||||
void FileBasedUserManager::load_all() {
|
||||
FileBasedUser::load_all();
|
||||
}
|
||||
|
||||
void FileBasedUserManager::set_path(const std::string &path) {
|
||||
FileBasedUser::set_path(path);
|
||||
}
|
||||
|
||||
FileBasedUserManager::FileBasedUserManager() :
|
||||
UserManager() {
|
||||
}
|
||||
|
@ -11,6 +11,9 @@ class FileBasedUserManager : public UserManager {
|
||||
|
||||
public:
|
||||
virtual User *create_user();
|
||||
void load_all();
|
||||
|
||||
void set_path(const std::string &path);
|
||||
|
||||
FileBasedUserManager();
|
||||
~FileBasedUserManager();
|
||||
|
@ -47,6 +47,9 @@ User *UserManager::create_user() {
|
||||
return u;
|
||||
}
|
||||
|
||||
void UserManager::load_all() {
|
||||
}
|
||||
|
||||
void UserManager::clear() {
|
||||
SessionManager *sm = SessionManager::get_singleton();
|
||||
|
||||
|
@ -16,6 +16,7 @@ public:
|
||||
void remove_user(User *user);
|
||||
User *get_user(const std::string &user_name);
|
||||
virtual User *create_user();
|
||||
virtual void load_all();
|
||||
|
||||
void clear();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user