X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/c59911ca3cd38cf4ab36d2cc62686f97395899f9..ee1709cd231588fe672d0bd2546ef69ee87ff88c:/projects/stargazer/plugins/authorization/ao/ao.h diff --git a/projects/stargazer/plugins/authorization/ao/ao.h b/projects/stargazer/plugins/authorization/ao/ao.h index a97a0918..18b41429 100644 --- a/projects/stargazer/plugins/authorization/ao/ao.h +++ b/projects/stargazer/plugins/authorization/ao/ao.h @@ -24,6 +24,7 @@ #include "stg/module_settings.h" #include "stg/store.h" #include "stg/notifer.h" +#include "stg/subscriptions.h" #include "stg/user_ips.h" #include "stg/user.h" #include "stg/logger.h" @@ -121,31 +122,8 @@ private: std::list > BeforeChgIPNotifierList; std::list > AfterChgIPNotifierList; - class ADD_USER_NONIFIER: public STG::NotifierBase { - public: - explicit ADD_USER_NONIFIER(AUTH_AO & a) : auth(a) {} - virtual ~ADD_USER_NONIFIER() {} - void notify(const UserPtr & user) override { auth.AddUser(user); } - - private: - ADD_USER_NONIFIER(const ADD_USER_NONIFIER & rvalue); - ADD_USER_NONIFIER & operator=(const ADD_USER_NONIFIER & rvalue); - - AUTH_AO & auth; - } onAddUserNotifier; - - class DEL_USER_NONIFIER: public STG::NotifierBase { - public: - explicit DEL_USER_NONIFIER(AUTH_AO & a) : auth(a) {} - virtual ~DEL_USER_NONIFIER() {} - void notify(const UserPtr & user) override { auth.DelUser(user); } - - private: - DEL_USER_NONIFIER(const DEL_USER_NONIFIER & rvalue); - DEL_USER_NONIFIER & operator=(const DEL_USER_NONIFIER & rvalue); - - AUTH_AO & auth; - } onDelUserNotifier; + STG::ScopedConnection m_onAddUserConn; + STG::ScopedConnection m_onDelUserConn; STG::PluginLogger logger;