-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
feat(server): Add config option to disable admin registration #24539
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
base: main
Are you sure you want to change the base?
feat(server): Add config option to disable admin registration #24539
Conversation
danieldietzler
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
|
📖 Documentation deployed to docs.pr-24539.preview.immich.app |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to expose this in the API, by updating SystemConfigOAuthDto. You should also add this option as a switch/toggle in the web ui.
|
Ok, I'll have a look! |
|
I added a switch, but while trying to confirm that it works i realized that it is pretty useless. You can only see the settings page if you have already registered an admin user and are logged in as this user. So this config option does not make sense if you don't use the config.json file. Also disabling after already having created an admin user will have no effect. @jrasm91 what do you think? |
3e94bdb to
d318d64
Compare
|
Oh, true. Probably we don't need the switch in the UI, since it's useless in this case. I think we should probably still add it to the dto though, since that is used for validation. I'm actually surprised that the functionality would work without validation. How is it loading the value from the config file if wasn't added to the dto? |
|
Isn't the Dto only used for API stuff? As far as I could tell it's not really used in this case, as the config value is only used on the server. |
d318d64 to
a03fd3f
Compare
a03fd3f to
60edd06
Compare
Description
Since it is possible to create Immich admin users via OIDC, registering an admin user first is no longer a strict requirement. Therefore an option (default disabled) is needed to skip this step.
Fixes #18847
How Has This Been Tested?
Checklist:
src/services/uses repositories implementations for database calls, filesystem operations, etc.src/repositories/is pretty basic/simple and does not have any immich specific logic (that belongs insrc/services/)Please describe to which degree, if any, an LLM was used in creating this pull request.
None, all written by hand.