[PR #4723] [MERGED] [PM-3553] Support SimpleLogin self hosted servers #5159

Closed
opened 2025-11-26 23:54:49 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/bitwarden/android/pull/4723
Author: @SaintPatrck
Created: 2/13/2025
Status: Merged
Merged: 2/19/2025
Merged by: @SaintPatrck

Base: mainHead: PM-3553/simelogin-selfhost-url


📝 Commits (6)

  • 61f1921 Add SimpleLogin self-hosted server URL support
  • 605acd3 Add support for self-hosted SimpleLogin server
  • b982ae6 Update SimpleLogin ServiceType to include URL.
  • 88b4193 Add tests for empty values in ForwardedEmailServiceTypeExtensionsTest
  • d49dc90 Rebase & resolve conflicts
  • 9720c12 Fix tests

📊 Changes

13 files changed (+344 additions, -6 deletions)

View changed files

📝 app/src/main/java/com/x8bit/bitwarden/data/tools/generator/repository/model/UsernameGenerationOptions.kt (+3 -0)
📝 app/src/main/java/com/x8bit/bitwarden/ui/tools/feature/generator/GeneratorScreen.kt (+22 -0)
📝 app/src/main/java/com/x8bit/bitwarden/ui/tools/feature/generator/GeneratorViewModel.kt (+67 -0)
📝 app/src/main/java/com/x8bit/bitwarden/ui/tools/feature/generator/handlers/ForwardedEmailAliasHandlers.kt (+9 -1)
📝 app/src/main/java/com/x8bit/bitwarden/ui/tools/feature/generator/util/ForwardedEmailServiceTypeExtensions.kt (+6 -1)
📝 app/src/main/java/com/x8bit/bitwarden/ui/tools/feature/generator/util/ServiceTypeExtensions.kt (+7 -1)
📝 app/src/test/java/com/x8bit/bitwarden/data/tools/generator/datasource/disk/GeneratorDiskSourceTest.kt (+3 -0)
📝 app/src/test/java/com/x8bit/bitwarden/data/tools/generator/repository/GeneratorRepositoryTest.kt (+3 -0)
📝 app/src/test/java/com/x8bit/bitwarden/ui/tools/feature/generator/GeneratorScreenTest.kt (+88 -0)
📝 app/src/test/java/com/x8bit/bitwarden/ui/tools/feature/generator/GeneratorViewModelTest.kt (+59 -0)
📝 app/src/test/java/com/x8bit/bitwarden/ui/tools/feature/generator/util/ForwardedEmailServiceTypeExtensionsTest.kt (+5 -0)
📝 app/src/test/java/com/x8bit/bitwarden/ui/tools/feature/generator/util/ServiceTypeExtensionsTest.kt (+71 -2)
📝 gradle/libs.versions.toml (+1 -1)

📄 Description

🎟️ Tracking

PM-3553
Resolves https://github.com/bitwarden/android/issues/4308

📔 Objective

Allow users to enter a custom server URL for SimpleLogin username generation.

  • Update Bitwarden SDK.
  • Add a new simpleLoginSelfHostServerUrl field to UsernameGenerationOptions to store the custom server URL.
  • Update ServiceType.SimpleLogin to include a selfHostServerUrl field and a default URL.
  • Modify toUsernameGeneratorRequest to handle self-hosted URLs, defaulting to the official SimpleLogin URL if not specified or if feature flag is off.
  • Introduce a new SelfHostServerUrlChange action for updating the self-hosted URL.
  • Add shouldShowSimpleLoginSelfHostServerField to GeneratorState to control visibility of server url input field.
  • Update GeneratorViewModel to handle the new action, the new field and feature flag.

📸 Screenshots

image

Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation or informed the documentation team

🦮 Reviewer guidelines

  • 👍 (:+1:) or similar for great changes
  • 📝 (:memo:) or ℹ️ (:information_source:) for notes or general info
  • (:question:) for questions
  • 🤔 (:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed
    issue and could potentially benefit from discussion
  • 🎨 (:art:) for suggestions / improvements
  • (:x:) or ⚠️ (:warning:) for more significant problems or concerns needing attention
  • 🌱 (:seedling:) or ♻️ (:recycle:) for future improvements or indications of technical debt
  • ⛏ (:pick:) for minor or nitpick changes

🔄 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/bitwarden/android/pull/4723 **Author:** [@SaintPatrck](https://github.com/SaintPatrck) **Created:** 2/13/2025 **Status:** ✅ Merged **Merged:** 2/19/2025 **Merged by:** [@SaintPatrck](https://github.com/SaintPatrck) **Base:** `main` ← **Head:** `PM-3553/simelogin-selfhost-url` --- ### 📝 Commits (6) - [`61f1921`](https://github.com/bitwarden/android/commit/61f1921d3195220719838a75c765f889d7e079b8) Add SimpleLogin self-hosted server URL support - [`605acd3`](https://github.com/bitwarden/android/commit/605acd38efbd76a12deee2a4b99aa3010cb46f68) Add support for self-hosted SimpleLogin server - [`b982ae6`](https://github.com/bitwarden/android/commit/b982ae690c252afe9838c01de9bfaa2c9235df89) Update SimpleLogin `ServiceType` to include URL. - [`88b4193`](https://github.com/bitwarden/android/commit/88b41938f6e9127ece448e61b34e4109bfa9a060) Add tests for empty values in ForwardedEmailServiceTypeExtensionsTest - [`d49dc90`](https://github.com/bitwarden/android/commit/d49dc900c5c3120bc58fbc864aae6307af903fde) Rebase & resolve conflicts - [`9720c12`](https://github.com/bitwarden/android/commit/9720c124f8b10e2e292a81b2f923d2af5cca9df7) Fix tests ### 📊 Changes **13 files changed** (+344 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `app/src/main/java/com/x8bit/bitwarden/data/tools/generator/repository/model/UsernameGenerationOptions.kt` (+3 -0) 📝 `app/src/main/java/com/x8bit/bitwarden/ui/tools/feature/generator/GeneratorScreen.kt` (+22 -0) 📝 `app/src/main/java/com/x8bit/bitwarden/ui/tools/feature/generator/GeneratorViewModel.kt` (+67 -0) 📝 `app/src/main/java/com/x8bit/bitwarden/ui/tools/feature/generator/handlers/ForwardedEmailAliasHandlers.kt` (+9 -1) 📝 `app/src/main/java/com/x8bit/bitwarden/ui/tools/feature/generator/util/ForwardedEmailServiceTypeExtensions.kt` (+6 -1) 📝 `app/src/main/java/com/x8bit/bitwarden/ui/tools/feature/generator/util/ServiceTypeExtensions.kt` (+7 -1) 📝 `app/src/test/java/com/x8bit/bitwarden/data/tools/generator/datasource/disk/GeneratorDiskSourceTest.kt` (+3 -0) 📝 `app/src/test/java/com/x8bit/bitwarden/data/tools/generator/repository/GeneratorRepositoryTest.kt` (+3 -0) 📝 `app/src/test/java/com/x8bit/bitwarden/ui/tools/feature/generator/GeneratorScreenTest.kt` (+88 -0) 📝 `app/src/test/java/com/x8bit/bitwarden/ui/tools/feature/generator/GeneratorViewModelTest.kt` (+59 -0) 📝 `app/src/test/java/com/x8bit/bitwarden/ui/tools/feature/generator/util/ForwardedEmailServiceTypeExtensionsTest.kt` (+5 -0) 📝 `app/src/test/java/com/x8bit/bitwarden/ui/tools/feature/generator/util/ServiceTypeExtensionsTest.kt` (+71 -2) 📝 `gradle/libs.versions.toml` (+1 -1) </details> ### 📄 Description ## 🎟️ Tracking PM-3553 Resolves https://github.com/bitwarden/android/issues/4308 ## 📔 Objective Allow users to enter a custom server URL for SimpleLogin username generation. - Update Bitwarden SDK. - Add a new `simpleLoginSelfHostServerUrl` field to `UsernameGenerationOptions` to store the custom server URL. - Update `ServiceType.SimpleLogin` to include a `selfHostServerUrl` field and a default URL. - Modify `toUsernameGeneratorRequest` to handle self-hosted URLs, defaulting to the official SimpleLogin URL if not specified or if feature flag is off. - Introduce a new `SelfHostServerUrlChange` action for updating the self-hosted URL. - Add `shouldShowSimpleLoginSelfHostServerField` to `GeneratorState` to control visibility of server url input field. - Update `GeneratorViewModel` to handle the new action, the new field and feature flag. ## 📸 Screenshots <img width="395" alt="image" src="https://github.com/user-attachments/assets/e242bb46-8232-4467-bf6c-a52010868eae" /> ## ⏰ Reminders before review - Contributor guidelines followed - All formatters and local linters executed and passed - Written new unit and / or integration tests where applicable - Used internationalization (i18n) for all UI strings - CI builds passed - Communicated to DevOps any deployment requirements - Updated any necessary documentation or informed the documentation team ## 🦮 Reviewer guidelines <!-- Suggested interactions but feel free to use (or not) as you desire! --> - 👍 (`:+1:`) or similar for great changes - 📝 (`:memo:`) or ℹ️ (`:information_source:`) for notes or general info - ❓ (`:question:`) for questions - 🤔 (`:thinking:`) or 💭 (`:thought_balloon:`) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion - 🎨 (`:art:`) for suggestions / improvements - ❌ (`:x:`) or ⚠️ (`:warning:`) for more significant problems or concerns needing attention - 🌱 (`:seedling:`) or ♻️ (`:recycle:`) for future improvements or indications of technical debt - ⛏ (`:pick:`) for minor or nitpick changes --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-11-26 23:54:49 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/android#5159