Add option to require server login for user profile (#1367)

## Description
This PR adds a new method of protecting a user profile when switching to
it: server login. When enabled, switching to the user requires
authenticating with the server again via Quick Connect or username &
password. This is basically the same as the official client.

### Related issues
Closes #321
Related to #1330 - might cause merge conflicts
Related to #1287 - definitely causes merge conflicts

### Testing
Emulator with various uses cases including auto sign-in, switching
between server login & PIN protection, and removing the protection

## Screenshots
N/A, the login looks identical as adding a new user

## AI or LLM usage
None
This commit is contained in:
Damontecres 2026-05-20 12:00:02 -04:00 • committed by GitHub
parent 1463480e26
commit 45d466d76f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 813 additions and 35 deletions

View file

@ -914,9 +914,9 @@ sealed interface AppPreference<Pref, T> {
summaryOff = R.string.disabled,
)
val RequireProfilePin =
val ProtectProfilePreference =
AppClickablePreference<AppPreferences>(
title = R.string.require_pin_code,
title = R.string.profile_protection,
)
val ImageDiskCacheSize =
@ -1088,7 +1088,7 @@ val basicPreferences =
title = R.string.profile_specific_settings,
preferences =
listOf(
AppPreference.RequireProfilePin,
AppPreference.ProtectProfilePreference,
AppPreference.CustomizeHome,
AppPreference.UserPinnedNavDrawerItems,
),