-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Registration fails when SHOW_REGISTRATION_BUTTON = false #5183
Comments
It seems no error on log files. |
You can reproduce this behavior with the mentioned settings. You can reach the regular SignUp page because there's nothing that checks the settings entry Line 899 in c8a9384
If you hit the send button/trigger the form-post, the action checks if Lines 926 to 929 in c8a9384
I believe there are two ways to change this:
what do you think? Is it worth a pr? |
@romankl PR is welcome. |
Previously you could hide the sign up page with the following configs: ``` [service] SHOW_REGISTRATION_BUTTON = false ``` This would remove the sign up button from the navbar, but the user could still access the page with a direct link. During the http post action, the go action checked if the key `SHOW_REGISTRATION_BUTTON` was set to true. If not, the user received a 403. You can use this scenario for a semi-hidden sign up page that is only accessible through a direct link. I've changed the check in this PR to check if the sign up is allowed or not. The user can access the sign up page (if it's enabled) and sign up even if the value of `SHOW_REGISTRATION_BUTTON` is `false`, the user can sign up. Another solution could be: - unify `SHOW_REGISTRATION_BUTTON ` with `DISABLE_REGISTRATION ` to only show the registration page if it's enabled, but that would dis- allow the mentioned scenario fixes: go-gitea#5183 Signed-off-by: Roman <romaaan.git@gmail.com>
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions. |
[x]
):Description
Hi,
I've been trying gitea with some coworkers. For our tests, I've decided to go with registration enabled but with the registration button hidden. So our config looked like :
As expected, the registration button is hidden, but the registration page is visible. Then after filling the form. Validating it leads to a 403 page with empty content. No user is created.
Expected behavior : Registration works, and a new account is created.
Also, when SHOW_REGISTRATION_BUTTON is set to true, registration do work as expected.
Screenshots
The text was updated successfully, but these errors were encountered: