[x]):I would like to ask for the ability to add the mailer through the web interface after setup. Also I think it is common sense to be able to edit the mailer configuration through the web interface. I did not initially set one up, so my custom app.ini config only contained:
[mailer]
ENABLED = false
When I changed this to true, Gitea failed to start. I found in the log:
2017/05/12 10:37:51 [...s/setting/setting.go:1274 newMailService()] [E] Invalid mailer.FROM (): mail: no address
This field was not in my config, so I had to copy it from source and complete the configuration before I could get Gitea to start.
I think we should enable overall configuration through the webinterface after installing, not only for mail settings
enable overall configuration through the webinterface
There's a lot of values that _can not_ be changed during runtime, which is why Gitea doesn't allow for them to be changed in the WebUI.
A few of them listed here:
RUN_USER would require a complete restart of the service. And can not be done by Gitea itself.server.HTTP_PORT | HTTP_ADDR | PROTOCOL would require a restart of the http-server. Could be done by Gitea, but would kill any current connections (unless gracefully)server.SSH_PORT would require a restart of the ssh-server. Same as above 鈽濓笍 database.* would require a complete restart of Gitea. Could be done inside Gitea itself, but I don't see the point in this really.But the _biggest_ problem is that we don't load partial configs. So Gitea wouldn't know what has been changed, and would therefore require a _complete_ restart done by an outsider (see RUN_USER)
So currently Gitea can not reinitialize itself? Most software accepts this limitation by including a warning like: "A restart is needed before changes will take effect". Would this be an okay compromise?
There are still good reasons to allow editing in the web interface. For example, settings will be validated before they are written, and settings that depend on other settings can be marked as required.
The core problem of this issue is that the settings I needed did not exist in my config file, nor on the web config page. I needed to piece them together through trial and error until I had a valid config again.
did not exist in my config file, [...]. I needed to add them through trial and error until I had a valid config again.
https://github.com/go-gitea/gitea/blob/master/conf/app.ini#L263-L294
With that said, our documentation definitively needs improvement 馃槀
Most helpful comment
So currently Gitea can not reinitialize itself? Most software accepts this limitation by including a warning like: "A restart is needed before changes will take effect". Would this be an okay compromise?
There are still good reasons to allow editing in the web interface. For example, settings will be validated before they are written, and settings that depend on other settings can be marked as required.
The core problem of this issue is that the settings I needed did not exist in my config file, nor on the web config page. I needed to piece them together through trial and error until I had a valid config again.