Changes:
- Implements #2061
- Introduce EventManager for user-specific Windows event publishing/listening
- Add real-time notification and account-disabled event propagation
- Register authentication events through Controller and AuthenticationManagementService
- Trigger notification events from Inventory, Payment, and Service Management modules
- Trigger account-disabled events when users are deactivated
- Extract common menu event listener logic into Menu base class
- Add notification popup handling for Admin, Customer, and Technician menus
- Refactor shared memory components into core/sharedmemory
- Update project structure and include paths for events and shared memory modules
<UserStory> 1952: Service Refactoring </UserStory>
UserStory #1952
<Changes>
1. Enhanced DataStore::getUsers to load SerializedUser records, refresh cache,
and attach notifications to recipient users with validation for recipient IDs.
2. Updated DataStore::saveUsers to persist SerializedUser records and save
notifications alongside user data.
3. Refactored AuthenticationManagementService::login to use DataStoreLockGuard
and tracked user map with SerializedUser-backed records.
4. Modified AuthenticationManagementService::changePassword to ensure thread-safe
updates, mark user record as MODIFIED, and persist changes via DataStore::saveUsers.
5. Added dependencies for Utility.h and DataStoreLockGuard.h in
AuthenticationManagementService.cpp to support safe record handling.
</Changes>
<Test>
N/A
</Test>
<Review>
Sreeja Reghukumar
</Review>
Changes:
- Added missing include for MenuHelper.h in project and AdminMenu
- Fixed typo in variable name inventoryIems to inventoryItems in Controller.cpp
- Removed stray semicolon from include in Controller.h
- Cleaned up duplicate comments in Controller.cpp description header
- Minor formatting adjustments with blank lines after headers in multiple files
- Updated ServiceManagementService notification message to remove informal wording
- Refactored AdminMenu::changePassword to use changePasswordHelper
- Added util::clear() call at start of viewStockLevels
- Removed redundant helper functions from AdminMenu.cpp and moved to shared helpers
- Fixed bug in removeInventoryItem to use activeItems instead of inventoryItems
- Enhanced createComboPackages to enforce selection of two distinct services
- General comment cleanup and formatting consistency across headers and implementation files
<UserStory> ADM005: Change Password </UserStory>
<Changes>
1. Added AuthenticationManagementService::changePassword to update the authenticated user’s password with validation.
2. Integrated Controller::changePassword to delegate password update requests to AuthenticationManagementService.
3. Enhanced AdminMenu::changePassword to prompt for new password, validate strength using Validator, and confirm update.
4. Added error handling to prevent password change when no user is logged in.
5. Provided user feedback messages for invalid password attempts and successful updates.
</Changes>
<Test>
Precondition:
1. Admin is logged into the system.
2. AuthenticationManagementService maintains active session.
3. Validator is available for password strength checks.
Steps:
1. Navigate to Admin Menu and select "Change Password".
2. Enter old password incorrectly.
- Verify that system rejects the attempt and displays error.
3. Enter new password that fails validation (length/complexity).
- Verify that system rejects with "Error: Password is not strong enough!".
4. Enter valid old password and strong new password.
- Verify that system confirms "Password changed successfully" and updates the user’s password.
</Test>
<Review>
Sreeja Reghukumar
</Review>
<UserStory> CUS001:Login </UserStory>
<Changes>
1. Added login implementation in AuthenticationManagementService to validate username and password from stored user records.
2. Connected Controller::login() with AuthenticationManagementService login logic.
3. Added getAuthenticatedUser() integration in Controller for retrieving the logged-in user.
4. Implemented login flow in UserInterface to collect credentials and validate login.
5. Added role-based menu navigation for Admin, Technician, and Customer after successful login.
6. Added error handling to display "Invalid Username or Password" for failed login attempts.
7. Added required includes and controller member dependency for authentication support.
8. Added a check to create a default admin automatically if no admin exists in the system on startup
</Changes>
<Test>
Login functionality validation
Precondition:
1. System is running.
2. User records are available in the data store.
3. Valid username and password exist for a registered user.
Steps:
1. Launch the application.
2. Select the login option from the main menu.
3. Enter a valid username and password.
- Verify that the entered credentials are validated.
- Verify that access is granted and the correct menu is shown based on user type.
4. Enter an invalid username or password.
- Verify that the message "Invalid Username or Password" is displayed.
</Test>
<Review>
Sreeja Reghukumar, please review
</Review>
<UserStory> ADM004: Logout </UserStory>
<Changes>
1. Added AuthenticationManagementService::logout to clear authenticated user session.
2. Integrated logout handling in Controller::logout to delegate session termination.
3. Updated AdminMenu::logout and TechnicianMenu::logout to call Controller::logout for consistent session management.
4. Extended TechnicianMenu.h with logout method declaration.
5. Ensured session termination returns control to main menu after logout.
</Changes>
<Test>
Precondition:
1. User is logged into the system (Admin or Technician).
2. AuthenticationManagementService maintains active session.
3. Controller is connected to AuthenticationManagementService.
Steps:
1. Navigate to Admin or Technician Menu.
2. Select "Logout" option.
- Verify that AuthenticationManagementService::logout clears authenticated user.
3. Session is terminated.
- Verify that system confirms logout and invalidates session.
4. Console returns to main menu.
- Verify that user is redirected to main menu and must log in again to continue.
</Test>
<Review>
Sreeja Reghukumar
</Review>
<UserStory> CUS003: Implement change password functionality </UserStory>
<Changes>
1. Connected Controller::changePassword() with AuthenticationManagementService password update logic.
2. Added password validation before updating the user password.
3. Added logged-in user check before allowing password changes.
4. Implemented password update logic in AuthenticationManagementService.
5. Added change password flow in CustomerMenu to collect new password input and trigger password update.
6. Added success message display after password is changed successfully.
</Changes>
<Test>
Change password functionality validation
Precondition:
1. System is running.
2. A registered user exists in the data store.
3. User is logged in and customer menu is active.
Steps:
1. Launch the application and log in with valid credentials.
2. Select the Change Password option from the customer menu.
3. Enter a new password.
- Verify that the entered password is validated.
4. If the password is valid, complete the password change.
- Verify that the new password is saved successfully.
- Verify that the message "Password changed successfully" is displayed.
</Test>
<Review>
Sreeja Reghukumar, please review
</Review>
<UserStory> CUS002: Logout</UserStory>
<Changes>
1. Connected Controller::logout() with AuthenticationManagementService logout logic.
2. Added logout implementation in AuthenticationManagementService to clear the authenticated user session.
3. Added logout handling in CustomerMenu to invoke controller logout when the user selects the logout option.
4. Added authentication service dependency in Controller for logout support.
</Changes>
<Test>
Logout functionality validation
Precondition:
1. System is running.
2. A registered user exists in the data store.
3. User is logged in and customer menu is active.
Steps:
1. Launch the application and log in with valid credentials.
- Verify that access is granted and customer menu is displayed.
2. Select the Logout option from the customer menu.
- Verify that the logout operation is triggered immediately.
3. Complete the logout operation.
- Verify that the authenticated user session is cleared.
4. After logout completes.
- Verify that the user is redirected to the login menu.
</Test>
<Review>
Sreeja Reghukumar, please review
</Review>