Merge branch 'feature-admin-management-adm004' into feature-admin-management
This commit is contained in:
@@ -8,6 +8,7 @@ bool Controller::login(const std::string& username, const std::string& password)
|
||||
|
||||
void Controller::logout()
|
||||
{
|
||||
m_authenticationManagementService.logout();
|
||||
}
|
||||
|
||||
void Controller::changePassword(const std::string& newPassword)
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include "Enums.h"
|
||||
#include "UserManagementService.h"
|
||||
#include "ServiceManagementService.h"
|
||||
#include "AuthenticationManagementService.h"
|
||||
|
||||
class Service;
|
||||
class ComboPackage;
|
||||
@@ -17,6 +18,7 @@ class Notification;
|
||||
class Controller
|
||||
{
|
||||
private:
|
||||
AuthenticationManagementService m_authenticationManagementService;
|
||||
UserManagementService m_userManagementService;
|
||||
ServiceManagementService m_serviceManagementService;
|
||||
public:
|
||||
|
||||
+5
@@ -1,3 +1,8 @@
|
||||
#include "AuthenticationManagementService.h"
|
||||
|
||||
User* AuthenticationManagementService::m_authenticatedUser = nullptr;
|
||||
|
||||
void AuthenticationManagementService::logout()
|
||||
{
|
||||
m_authenticatedUser = nullptr;
|
||||
}
|
||||
@@ -37,6 +37,7 @@ bool AdminMenu::handleOperation(int choice)
|
||||
|
||||
void AdminMenu::logout()
|
||||
{
|
||||
m_controller.logout();
|
||||
}
|
||||
|
||||
void AdminMenu::changePassword()
|
||||
|
||||
@@ -38,3 +38,8 @@ void TechnicianMenu::completeJob()
|
||||
void TechnicianMenu::viewNotifications()
|
||||
{
|
||||
}
|
||||
|
||||
void TechnicianMenu::logout()
|
||||
{
|
||||
m_controller.logout();
|
||||
}
|
||||
@@ -10,4 +10,5 @@ public:
|
||||
void showMenu();
|
||||
void completeJob();
|
||||
void viewNotifications();
|
||||
void logout();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user