mirror of
https://github.com/Telecominfraproject/wlan-cloud-ucentralsec.git
synced 2025-11-02 11:47:56 +00:00
Fixing ActionLinks
This commit is contained in:
@@ -48,7 +48,7 @@ namespace OpenWifi {
|
|||||||
StorageService()->SentAction(i.id);
|
StorageService()->SentAction(i.id);
|
||||||
} else if (i.action==OpenWifi::SecurityObjects::LinkActions::VERIFY_EMAIL) {
|
} else if (i.action==OpenWifi::SecurityObjects::LinkActions::VERIFY_EMAIL) {
|
||||||
if(AuthService::SendEmailToUser(i.id, i.userId, AuthService::EMAIL_VERIFICATION)) {
|
if(AuthService::SendEmailToUser(i.id, i.userId, AuthService::EMAIL_VERIFICATION)) {
|
||||||
Logger_.information(Poco::format("Send password reset link to %s",i.userId));
|
Logger_.information(Poco::format("Send email verification link to %s",i.userId));
|
||||||
}
|
}
|
||||||
StorageService()->SentAction(i.id);
|
StorageService()->SentAction(i.id);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -359,7 +359,7 @@ namespace OpenWifi {
|
|||||||
A.id = MicroService::instance().CreateUUID();
|
A.id = MicroService::instance().CreateUUID();
|
||||||
A.created = std::time(nullptr);
|
A.created = std::time(nullptr);
|
||||||
A.expires = A.created + 24*60*60;
|
A.expires = A.created + 24*60*60;
|
||||||
Storage().CreateAction(A);
|
StorageService()->CreateAction(A);
|
||||||
UInfo.waitingForEmailCheck = true;
|
UInfo.waitingForEmailCheck = true;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ namespace OpenWifi {
|
|||||||
auto Id = GetParameter("id","");
|
auto Id = GetParameter("id","");
|
||||||
|
|
||||||
SecurityObjects::ActionLink Link;
|
SecurityObjects::ActionLink Link;
|
||||||
if(!Storage().GetActionLink(Id,Link))
|
if(!StorageService()->GetActionLink(Id,Link))
|
||||||
return DoReturnA404();
|
return DoReturnA404();
|
||||||
|
|
||||||
if(Action=="password_reset")
|
if(Action=="password_reset")
|
||||||
@@ -34,7 +34,7 @@ namespace OpenWifi {
|
|||||||
auto Id = GetParameter("id","");
|
auto Id = GetParameter("id","");
|
||||||
|
|
||||||
SecurityObjects::ActionLink Link;
|
SecurityObjects::ActionLink Link;
|
||||||
if(!Storage().GetActionLink(Id,Link))
|
if(!StorageService()->GetActionLink(Id,Link))
|
||||||
return DoReturnA404();
|
return DoReturnA404();
|
||||||
|
|
||||||
Logger_.information(Poco::format("COMPLETE-PASSWORD-RESET(%s): For ID=%s", Request->clientAddress().toString(), Link.userId));
|
Logger_.information(Poco::format("COMPLETE-PASSWORD-RESET(%s): For ID=%s", Request->clientAddress().toString(), Link.userId));
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ namespace OpenWifi {
|
|||||||
NewLink.userId = userId;
|
NewLink.userId = userId;
|
||||||
NewLink.created = std::time(nullptr);
|
NewLink.created = std::time(nullptr);
|
||||||
NewLink.expires = NewLink.created + (24*60*60);
|
NewLink.expires = NewLink.created + (24*60*60);
|
||||||
Storage().CreateAction(NewLink);
|
StorageService()->CreateAction(NewLink);
|
||||||
|
|
||||||
Poco::JSON::Object ReturnObj;
|
Poco::JSON::Object ReturnObj;
|
||||||
SecurityObjects::UserInfoAndPolicy UInfo;
|
SecurityObjects::UserInfoAndPolicy UInfo;
|
||||||
|
|||||||
@@ -103,8 +103,6 @@ namespace OpenWifi {
|
|||||||
DBType dbType_ = sqlite;
|
DBType dbType_ = sqlite;
|
||||||
};
|
};
|
||||||
|
|
||||||
// inline StorageClass * Storage() { return StorageClass::instance(); }
|
|
||||||
|
|
||||||
#ifdef SMALL_BUILD
|
#ifdef SMALL_BUILD
|
||||||
int Service::Setup_MySQL() { Daemon()->exit(Poco::Util::Application::EXIT_CONFIG); return 0; }
|
int Service::Setup_MySQL() { Daemon()->exit(Poco::Util::Application::EXIT_CONFIG); return 0; }
|
||||||
int Service::Setup_PostgreSQL() { Daemon()->exit(Poco::Util::Application::EXIT_CONFIG); return 0; }
|
int Service::Setup_PostgreSQL() { Daemon()->exit(Poco::Util::Application::EXIT_CONFIG); return 0; }
|
||||||
|
|||||||
Reference in New Issue
Block a user