Allow admin to set theme for new and existing users with API #13140

Closed
opened 2025-11-02 10:32:25 -06:00 by GiteaMirror · 4 comments
Owner

Originally created by @tobiasbp on GitHub (Jun 12, 2024).

Feature Description

It would be nice if the following endpoints could be updated to include field theme, which would allow an administrator to configure the theme for new and existing users on a Gitea instance:

  • PATCH: /admin/users/<user>
  • POST: /admin/users
  • GET: /admin/users

Use case: If a theme selected by a user no longer exists, there is no way to set the user's theme to a currently available theme.

Screenshots

No response

Originally created by @tobiasbp on GitHub (Jun 12, 2024). ### Feature Description It would be nice if the following endpoints could be updated to include field _theme_, which would allow an administrator to configure the theme for new and existing users on a _Gitea_ instance: * PATCH: /admin/users/\<user\> * POST: /admin/users * GET: /admin/users Use case: If a theme selected by a user no longer exists, there is no way to set the user's theme to a currently available theme. ### Screenshots _No response_
GiteaMirror added the topic/apitype/proposalissue/needs-feedback labels 2025-11-02 10:32:25 -06:00
Author
Owner

@silverwind commented on GitHub (Jun 12, 2024):

Use case: If a theme selected by a user no longer exists, there is no way to set the user's theme to a currently available theme.

Sidenote: What happens when a theme is deleted that is in use? Do the users get the "no theme" black on white view? I think we could in such cases automatically fall back to the default theme ("gitea-auto").

@silverwind commented on GitHub (Jun 12, 2024): > Use case: If a theme selected by a user no longer exists, there is no way to set the user's theme to a currently available theme. Sidenote: What happens when a theme is deleted that is in use? Do the users get the "no theme" black on white view? I think we could in such cases automatically fall back to the default theme ("gitea-auto").
Author
Owner

@wxiaoguang commented on GitHub (Jun 12, 2024):

I think we could in such cases automatically fall back to the default theme ("gitea-auto").

It has been implemented in 1.22 by #30625

https://github.com/go-gitea/gitea/pull/30625/files#diff-df6792f0bd4f2d349508731c08110a47e5cf0c9559f863f9bb5d7c37cd4f1240R261-R269

@wxiaoguang commented on GitHub (Jun 12, 2024): > I think we could in such cases automatically fall back to the default theme ("gitea-auto"). It has been implemented in 1.22 by #30625 https://github.com/go-gitea/gitea/pull/30625/files#diff-df6792f0bd4f2d349508731c08110a47e5cf0c9559f863f9bb5d7c37cd4f1240R261-R269
Author
Owner

@wxiaoguang commented on GitHub (Jun 15, 2024):

Use case: If a theme selected by a user no longer exists, there is no way to set the user's theme to a currently available theme.

@tobiasbp is it still a problem in 1.22? I think 1.22 could fall back to the default theme in this case.

@wxiaoguang commented on GitHub (Jun 15, 2024): > Use case: If a theme selected by a user no longer exists, there is no way to set the user's theme to a currently available theme. @tobiasbp is it still a problem in 1.22? I think 1.22 could fall back to the default theme in this case.
Author
Owner

@GiteaBot commented on GitHub (Jul 16, 2024):

We close issues that need feedback from the author if there were no new comments for a month. 🍵

@GiteaBot commented on GitHub (Jul 16, 2024): We close issues that need feedback from the author if there were no new comments for a month. :tea:
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#13140