Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
tobiasbp opened this issue Jun 12, 2024 · 4 comments
Closed

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

tobiasbp opened this issue Jun 12, 2024 · 4 comments
Labels
issue/needs-feedback For bugs, we need more details. For features, the feature must be described in more detail topic/api Concerns mainly the API type/proposal The new feature has not been accepted yet but needs to be discussed first.

Comments

@tobiasbp
Copy link
Contributor

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

@tobiasbp tobiasbp added the type/proposal The new feature has not been accepted yet but needs to be discussed first. label Jun 12, 2024
@silverwind
Copy link
Member

silverwind commented 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").

@wxiaoguang
Copy link
Contributor

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

@kemzeb kemzeb added the topic/api Concerns mainly the API label Jun 15, 2024
@wxiaoguang
Copy link
Contributor

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 wxiaoguang added the issue/needs-feedback For bugs, we need more details. For features, the feature must be described in more detail label Jun 15, 2024
@GiteaBot
Copy link
Collaborator

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

@go-gitea go-gitea locked as resolved and limited conversation to collaborators Oct 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
issue/needs-feedback For bugs, we need more details. For features, the feature must be described in more detail topic/api Concerns mainly the API type/proposal The new feature has not been accepted yet but needs to be discussed first.
Projects
None yet
Development

No branches or pull requests

5 participants