1
0
Fork 0
mirror of https://github.com/maziggy/bambuddy.git synced 2026-05-09 08:25:54 +02:00

[PR #700] [MERGED] [Fix]: Allow SMTP to be configured before Advanced Authentication is enabled #1101

Closed
opened 2026-05-07 00:16:01 +02:00 by BreizhHardware · 0 comments

📋 Pull Request Information

Original PR: https://github.com/maziggy/bambuddy/pull/700
Author: @shrunbr
Created: 3/14/2026
Status: Merged
Merged: 3/14/2026
Merged by: @maziggy

Base: devHead: fix/smtpEnablement


📝 Commits (10+)

  • 58939d1 Removes requirement for advanced authentication to be enabled for SMTP configuration block and test smtp configuration block. Adds query to fetch global authentication status, adds global authentication status check while enabling advanced auth.
  • 1ed4f42 Clears authStatus cache after successfully setting up authentication which resolves a bug where if a user tried to enable advanced authentication right away after enable auth they receive an error telling them auth was not enabled still.
  • f2b9fba Adds enableAuthFirst error in English
  • 2493abc Adds enableAuthFirst error in all other languages using Google Translate
  • 380dde2 Adds comment above authStatus cache clear
  • b85a05d Updates comments for Test SMTP and SMTP Configuration sections
  • f832319 Simplifies, instead of updating then clearing cache, just clear it (invalidate it)
  • 899aa91 Merge branch 'dev' into fix/smtpEnablement
  • 4761afa Refactor auth status handling in EmailSettings
  • 71d795e Remove authStatus cache invalidation on setup success

📊 Changes

8 files changed (+19 additions, -5 deletions)

View changed files

📝 frontend/src/components/EmailSettings.tsx (+12 -5)
📝 frontend/src/i18n/locales/de.ts (+1 -0)
📝 frontend/src/i18n/locales/en.ts (+1 -0)
📝 frontend/src/i18n/locales/fr.ts (+1 -0)
📝 frontend/src/i18n/locales/it.ts (+1 -0)
📝 frontend/src/i18n/locales/ja.ts (+1 -0)
📝 frontend/src/i18n/locales/pt-BR.ts (+1 -0)
📝 frontend/src/i18n/locales/zh-CN.ts (+1 -0)

📄 Description

Description

This pull request allows a user to configure and test SMTP settings before enabling Advanced Authentication within the web interface. Prior to this pull request if a user tried to enable Advanced Authentication it would tell them that they needed to send a test email first.

COPILOT GENERATED SUMMARY

This pull request improves the email authentication and SMTP configuration experience in the frontend by adding stricter checks, updating UI behavior, and enhancing internationalization support. The main changes ensure users cannot enable advanced email authentication without first enabling global authentication, and provide clearer, localized error messages. Additionally, the UI logic for disabling SMTP-related sections has been adjusted, and the authentication status cache is now properly updated after setup.

Fixes #697

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Code refactoring
  • Performance improvement
  • Test addition or update

Changes Made

EmailSettings.tsx

  • Removes the class from the SMTP configuration and test SMTP divs requiring Advanced Authentication to allow these to be configured
  • Fetches global auth status
  • Uses that global auth status check to make sure that users have authentication enabled first before trying to enable advanced authentication. Previous checks are still present, this one just happens first.

Translations

  • Adds new enableAuthFirst message

SetupPage.tsx

  • After implementing the fixes above, I would go to enable authentication and immediately try to enable advanced authentication but I would get my new enableAuthFirst message. I found that this was because of the authStatus cache so now that is getting cleared after successfully setting up authentication

Screenshots

image image

Testing

  • I have tested this on my local machine
  • I have tested with my printer model: N/A

Checklist

  • My code follows the project's coding style
  • I have commented my code where necessary
  • I have updated the documentation (if needed)
  • My changes generate no new warnings
  • I have tested my changes thoroughly

Additional Notes

N/A


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/maziggy/bambuddy/pull/700 **Author:** [@shrunbr](https://github.com/shrunbr) **Created:** 3/14/2026 **Status:** ✅ Merged **Merged:** 3/14/2026 **Merged by:** [@maziggy](https://github.com/maziggy) **Base:** `dev` ← **Head:** `fix/smtpEnablement` --- ### 📝 Commits (10+) - [`58939d1`](https://github.com/maziggy/bambuddy/commit/58939d1981e8380bce7af9bde3c151bbd6da87e8) Removes requirement for advanced authentication to be enabled for SMTP configuration block and test smtp configuration block. Adds query to fetch global authentication status, adds global authentication status check while enabling advanced auth. - [`1ed4f42`](https://github.com/maziggy/bambuddy/commit/1ed4f427f10f7367fb2d24682a0f99b1d1800e6c) Clears authStatus cache after successfully setting up authentication which resolves a bug where if a user tried to enable advanced authentication right away after enable auth they receive an error telling them auth was not enabled still. - [`f2b9fba`](https://github.com/maziggy/bambuddy/commit/f2b9fbab45e0e14ce0ecbbd9750a3c4a995d226d) Adds enableAuthFirst error in English - [`2493abc`](https://github.com/maziggy/bambuddy/commit/2493abca2bacec662cf11e21164df6a6ee07c711) Adds enableAuthFirst error in all other languages using Google Translate - [`380dde2`](https://github.com/maziggy/bambuddy/commit/380dde2e130d61ccaf0d9b000d2fa55831b3c804) Adds comment above authStatus cache clear - [`b85a05d`](https://github.com/maziggy/bambuddy/commit/b85a05ddb19a22c6b38bbe806575f2a32a8b079e) Updates comments for Test SMTP and SMTP Configuration sections - [`f832319`](https://github.com/maziggy/bambuddy/commit/f8323191562fcee6cce3105a2c324276a9a7ea63) Simplifies, instead of updating then clearing cache, just clear it (invalidate it) - [`899aa91`](https://github.com/maziggy/bambuddy/commit/899aa914f8644d5b2852b18d81153349b7490e63) Merge branch 'dev' into fix/smtpEnablement - [`4761afa`](https://github.com/maziggy/bambuddy/commit/4761afa0aa20b0587ee74f2b85b7b06d4959d138) Refactor auth status handling in EmailSettings - [`71d795e`](https://github.com/maziggy/bambuddy/commit/71d795e131102a7f36153cdf4c2fc6f0253a57bf) Remove authStatus cache invalidation on setup success ### 📊 Changes **8 files changed** (+19 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `frontend/src/components/EmailSettings.tsx` (+12 -5) 📝 `frontend/src/i18n/locales/de.ts` (+1 -0) 📝 `frontend/src/i18n/locales/en.ts` (+1 -0) 📝 `frontend/src/i18n/locales/fr.ts` (+1 -0) 📝 `frontend/src/i18n/locales/it.ts` (+1 -0) 📝 `frontend/src/i18n/locales/ja.ts` (+1 -0) 📝 `frontend/src/i18n/locales/pt-BR.ts` (+1 -0) 📝 `frontend/src/i18n/locales/zh-CN.ts` (+1 -0) </details> ### 📄 Description ## Description This pull request allows a user to configure and test SMTP settings before enabling Advanced Authentication within the web interface. Prior to this pull request if a user tried to enable Advanced Authentication it would tell them that they needed to send a test email first. **COPILOT GENERATED SUMMARY** This pull request improves the email authentication and SMTP configuration experience in the frontend by adding stricter checks, updating UI behavior, and enhancing internationalization support. The main changes ensure users cannot enable advanced email authentication without first enabling global authentication, and provide clearer, localized error messages. Additionally, the UI logic for disabling SMTP-related sections has been adjusted, and the authentication status cache is now properly updated after setup. ## Related Issue <!-- Link to the issue this PR addresses (if applicable) --> Fixes #697 ## Type of Change <!-- Mark the relevant option with an "x" --> - [X] Bug fix (non-breaking change that fixes an issue) - [ ] New feature (non-breaking change that adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) - [ ] Documentation update - [ ] Code refactoring - [ ] Performance improvement - [ ] Test addition or update ## Changes Made <!-- List the specific changes made in this PR --> **EmailSettings.tsx** - Removes the class from the SMTP configuration and test SMTP divs requiring Advanced Authentication to allow these to be configured - Fetches global auth status - Uses that global auth status check to make sure that users have authentication enabled first before trying to enable advanced authentication. Previous checks are still present, this one just happens first. **Translations** - Adds new enableAuthFirst message **SetupPage.tsx** - After implementing the fixes above, I would go to enable authentication and immediately try to enable advanced authentication but I would get my new enableAuthFirst message. I found that this was because of the authStatus cache so now that is getting cleared after successfully setting up authentication ## Screenshots <img width="690" height="1146" alt="image" src="https://github.com/user-attachments/assets/e5abf791-7dd3-4558-b7e0-0246713bb352" /> <img width="595" height="76" alt="image" src="https://github.com/user-attachments/assets/7d4770d5-c1ca-48ea-bada-e252c7763bef" /> ## Testing - [X] I have tested this on my local machine - [X] I have tested with my printer model: N/A ## Checklist - [X] My code follows the project's coding style - [X] I have commented my code where necessary - [X] I have updated the documentation (if needed) - [X] My changes generate no new warnings - [X] I have tested my changes thoroughly ## Additional Notes N/A --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
BreizhHardware 2026-05-07 00:16:01 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/bambuddy-maziggy-1#1101
No description provided.