AllYourBot / hostedgpt

An open version of ChatGPT you can host anywhere or run locally.
MIT License
304 stars 122 forks source link

Don't render signup link if registration feature is disabled #374

Closed mgomes closed 2 months ago

mgomes commented 2 months ago

Hides the signup link since the controller just redirects back to root path if the registration feature is disabled.

mgomes commented 2 months ago

Going to fix the system tests.

krschacht commented 2 months ago

@mgomes but the system test shouldn't fail by making this change because the feature is enabled by default so the link should be there. I actually think your conditional is backwards :)

mgomes commented 2 months ago

@krschacht haha thanks. I was wondering why it didn't default to true but didn't have a chance to check. :+1:

mgomes commented 2 months ago

@krschacht Ok, fixed the logic and added a system test. I had to move some of the private methods in the feature tests to helpers. I think they'll be useful, though, as more features get introduced and need to be tested in isolation.

krschacht commented 2 months ago

Good call, thanks for cleaning that up! Merging in