forgejo/services/user
0ko 61091e0027 fix(ui): fall back to default theme from non-existent (#13110)
When a user has a theme in the DB that is not among the themes in the configuration, the following happens to this user's UI:

Image: https://codeberg.org/attachments/bf8d4ff1-8216-4df5-ab90-8dc7e03784d9

The workaround is to manually go to Appearance settings and update the theme.

This can happen if the theme was removed from the server config. For example, admins don't want to have it anymore. Maybe it even was the default theme, which is being saved in the DB during sign up.

It will be useful for Forgejo if we, for example, want to separate colorblind them variants from the actual themes, or if we ever want to remove the Gitea themes. Rel: https://codeberg.org/forgejo/forgejo/pulls/13054.

And instance admins will also find it useful to not have to manually update the DB in case they want to get rid of some custom theme.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/13110
Reviewed-by: Robert Wolff <mahlzahn@posteo.de>
2026-06-17 19:18:09 +02:00
..
TestDeleteUser feat: add foreign keys to the action_runner_token table (#10756) 2026-01-12 21:59:40 +01:00
TestDeleteUserCleansUpBranchProtectionRules fix: replace bad pagination to cleanup branch protection rules on user delete (#9833) 2025-10-24 08:49:53 +02:00
TestPurgeUser Do not rewrite ssh keys files when deleting a user without one (#6097) 2024-12-05 21:32:09 +00:00
TestReplaceInactivePrimaryEmail chore: add delete old auth token unit test 2025-08-30 09:54:38 +02:00
avatar.go fix: re-uploading the same avatar doesn't delete it (#12823) 2026-05-30 13:25:36 +02:00
avatar_test.go fix: re-uploading the same avatar doesn't delete it (#12823) 2026-05-30 13:25:36 +02:00
block.go feat: cancel all pull requests runs when blocking a user 2025-11-06 11:07:39 +01:00
block_test.go feat: evaluate action job's if on the server-side when possible (#13030) 2026-06-16 00:02:57 +02:00
delete.go feat: setting to add team members by invitations (#12845) 2026-06-15 01:46:25 +02:00
email.go feat: Add admin individual user email management endpoints (#9594) 2025-10-28 15:52:37 +01:00
email_test.go chore: ensure consistent import aliasing for services and models (#10253) 2025-11-30 17:00:57 +01:00
update.go refactor: replace Value() from Option[T] with Get() & ValueOrZeroValue() (#11218) 2026-02-10 16:41:21 +01:00
update_test.go fix(ui): fall back to default theme from non-existent (#13110) 2026-06-17 19:18:09 +02:00
user.go fix: reflect allowed username change in profile setting (#11171) 2026-02-06 17:47:30 +01:00
user_test.go chore: fix typos throughout the codebase (#10753) 2026-01-26 22:57:33 +01:00