Skip to content
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

[Feature Request]: Allow to set up Admin user name #253

Closed
zc-devs opened this issue Jul 31, 2023 · 2 comments · Fixed by #263
Closed

[Feature Request]: Allow to set up Admin user name #253

zc-devs opened this issue Jul 31, 2023 · 2 comments · Fixed by #263
Labels
enhancement New feature or request
Milestone

Comments

@zc-devs
Copy link

zc-devs commented Jul 31, 2023

Scope

Other

What problem

Currently there is "no way" to change default admin username.

If I create new full permissions user (say, root_admin) and try to delete old default one, then I get:

There was an unexpected error (type=Internal Server Error, status=500).
org.springframework.dao.InvalidDataAccessApiUsageException: Can't delete admin user.; nested exception is java.lang.IllegalArgumentException: Can't delete admin user.
...
	at org.airsonic.player.controller.UserSettingsController.deleteUser(UserSettingsController.java:179)
	at org.airsonic.player.controller.UserSettingsController.doSubmitAction(UserSettingsController.java:151)
...

If I change name in database manually, then I loose safety check mentioned above.

Feature

I propose to make administrator name configurable.

  1. Allow to set environment variable (Spring property) with custom admin username (and probably password) like Postgres do with POSTGRES_USER (and POSTGRES_PASSWORD), for example.
  2. Only make configurable USERNAME_ADMIN in UserDao. Then we can change username manually in database and don't lose sefety check at least.
@zc-devs zc-devs added the enhancement New feature or request label Jul 31, 2023
@The-Exterminator
Copy link

Make a user with admin priv, and delete the admin

@The-Exterminator
Copy link

@zc-devs it work before 100%, so you dont need to chance the files :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

Successfully merging a pull request may close this issue.

3 participants