ALLOW_ONLY_EXTERNAL_REGISTRATION Appears to have no effect #1923

Closed
opened 2025-11-02 04:17:55 -06:00 by GiteaMirror · 13 comments
Owner

Originally created by @internalfx on GitHub (Jun 11, 2018).

  • Gitea version (or commit ref): 1.4.2
  • Git version:
  • Operating system: Ubuntu 18.04
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:

Description

ALLOW_ONLY_EXTERNAL_REGISTRATION Appears to have no effect

Screenshots

image

image

Originally created by @internalfx on GitHub (Jun 11, 2018). <!-- 1. Please speak English, this is the language all of us can speak and write. 2. Please ask questions or configuration/deploy problems on our Discord server (https://discord.gg/NsatcWJ) or forum (https://discourse.gitea.io). 3. Please take a moment to check that your issue doesn't already exist. 4. Please give all relevant information below for bug reports, because incomplete details will be handled as an invalid report. --> - Gitea version (or commit ref): 1.4.2 - Git version: - Operating system: Ubuntu 18.04 - Database (use `[x]`): - [x] PostgreSQL - [ ] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [ ] No - [x] Not relevant - Log gist: ## Description `ALLOW_ONLY_EXTERNAL_REGISTRATION` Appears to have no effect ## Screenshots ![image](https://user-images.githubusercontent.com/583701/41250121-dcafe2d8-6d6a-11e8-9927-4180b4061045.png) ![image](https://user-images.githubusercontent.com/583701/41250088-c85e1aac-6d6a-11e8-9082-fedbdd58fa2c.png)
GiteaMirror added the type/enhancementissue/stale labels 2025-11-02 04:17:55 -06:00
Author
Owner

@techknowlogick commented on GitHub (Jun 11, 2018):

Can you try setting DISABLE_REGISTRATION to true (and leaving the other settings the same)?

@techknowlogick commented on GitHub (Jun 11, 2018): Can you try setting `DISABLE_REGISTRATION` to `true` (and leaving the other settings the same)?
Author
Owner

@internalfx commented on GitHub (Jun 11, 2018):

That "works" but now you can't signup at all....

image

@internalfx commented on GitHub (Jun 11, 2018): That "works" but now you can't signup at all.... ![image](https://user-images.githubusercontent.com/583701/41250586-38d44490-6d6c-11e8-901c-3d6e41150d78.png)
Author
Owner

@L-P commented on GitHub (Jun 13, 2018):

Do you have any external auth configured?

auth

@L-P commented on GitHub (Jun 13, 2018): Do you have any external auth configured? ![auth](https://user-images.githubusercontent.com/947312/41345062-eca739c2-6f02-11e8-8e81-fcc45448673a.png)
Author
Owner

@internalfx commented on GitHub (Jun 13, 2018):

yep, two of them....

image

@internalfx commented on GitHub (Jun 13, 2018): yep, two of them.... ![image](https://user-images.githubusercontent.com/583701/41353133-274de734-6ed0-11e8-8197-d802da0d4040.png)
Author
Owner

@L-P commented on GitHub (Jun 13, 2018):

My bad. I actually have the same issue where I need to create a standard account beforehand and allow the user to link it himself.

This is a bug/evolution already described in #3520

@L-P commented on GitHub (Jun 13, 2018): My bad. I actually have the same issue where I need to create a standard account beforehand and allow the user to link it himself. This is a bug/evolution already described in #3520
Author
Owner

@lafriks commented on GitHub (Jun 19, 2018):

Marking as duplicate of #3520 than, please reopen if it is not

@lafriks commented on GitHub (Jun 19, 2018): Marking as duplicate of #3520 than, please reopen if it is not
Author
Owner

@internalfx commented on GitHub (Jun 19, 2018):

@lafriks I don't think this is a dup.

They are discussing different config options. I think a core dev may need to read both issues and make a determination, but they seem different to me.

@internalfx commented on GitHub (Jun 19, 2018): @lafriks I don't think this is a dup. They are discussing different config options. I think a core dev may need to read both issues and make a determination, but they _seem_ different to me.
Author
Owner

@lafriks commented on GitHub (Jun 19, 2018):

As I said feel free to reopen :)

@lafriks commented on GitHub (Jun 19, 2018): As I said feel free to reopen :)
Author
Owner

@internalfx commented on GitHub (Jun 19, 2018):

@lafriks You original statement was perfectly clear. My hesitation was that I reasoned that it might be possible that both bugs are caused by the same issue. However, they appear different, so I thought a developer would make the best determination, hence, my comment.

@internalfx commented on GitHub (Jun 19, 2018): @lafriks You original statement was perfectly clear. My hesitation was that I reasoned that it might be possible that both bugs are caused by the same issue. However, they _appear_ different, so I thought a developer would make the best determination, hence, my comment.
Author
Owner

@coolaj86 commented on GitHub (Oct 5, 2018):

This is the behavior I've observed

if not ALLOW_ONLY_EXTERNAL_REGISTRATION then
  show Sign Up
  show external registrations in applications list
end

if ALLOW_ONLY_EXTERNAL_REGISTRATION then
  reject /users/sign_up
end
  • You still have to create a password (after signing in with the external account)
  • You still have to login a second time (with the external account) after creating a password
@coolaj86 commented on GitHub (Oct 5, 2018): This is the behavior I've observed ``` if not ALLOW_ONLY_EXTERNAL_REGISTRATION then show Sign Up show external registrations in applications list end if ALLOW_ONLY_EXTERNAL_REGISTRATION then reject /users/sign_up end ``` * You still have to create a password (after signing in with the external account) * You still have to login a second time (with the external account) after creating a password
Author
Owner

@coolaj86 commented on GitHub (Oct 6, 2018):

I've begun work on a fix for this: https://github.com/go-gitea/gitea/pull/5029

If you'd like to test it out

My pull request is against master, but I run it as backport to v1.5.1 (includes https://github.com/go-gitea/gitea/pull/5006, https://github.com/go-gitea/gitea/pull/5029, https://github.com/go-gitea/gitea/pull/5033):

git clone https://github.com/coolaj86/gitea.git gitea.coolaj86 -b v1.5.1-coolaj86
pushd gitea.coolaj86
TAGS="bindata sqlite" make generate all

I would not recommend replacing your existing gitea, but rather creating a symlink so that you can easily switch back if you don't like it. For example, if you keep gitea in /opt/gitea/bin:

rsync -av ./gitea /opt/gitea/bin/gitea-v1.5.1-coolaj86
pushd /opt/gitea/bin
mv gitea gitea-v1.5.1
ln -s gitea-v1.5.1-coolaj86 gitea

I've run a couple of manual tests so far, so I feel comfortable with someone else trying it out. I won't be pushing any additional changes to that branch (such as the upcoming changes to address the empty checkboxes in the issue) until I've tested them in production for myself.

@coolaj86 commented on GitHub (Oct 6, 2018): I've begun work on a fix for this: https://github.com/go-gitea/gitea/pull/5029 If you'd like to test it out ==== My pull request is against `master`, but [I run it](https://git.coolaj86.com) as backport to v1.5.1 (includes https://github.com/go-gitea/gitea/pull/5006, https://github.com/go-gitea/gitea/pull/5029, https://github.com/go-gitea/gitea/pull/5033): ```bash git clone https://github.com/coolaj86/gitea.git gitea.coolaj86 -b v1.5.1-coolaj86 pushd gitea.coolaj86 TAGS="bindata sqlite" make generate all ``` I would not recommend replacing your existing gitea, but rather creating a symlink so that you can easily switch back if you don't like it. For example, if you keep `gitea` in `/opt/gitea/bin`: ```bash rsync -av ./gitea /opt/gitea/bin/gitea-v1.5.1-coolaj86 pushd /opt/gitea/bin mv gitea gitea-v1.5.1 ln -s gitea-v1.5.1-coolaj86 gitea ``` I've run a couple of manual tests so far, so I feel comfortable with someone else trying it out. I won't be pushing any additional changes to that branch (such as the upcoming changes to address the empty checkboxes in the issue) until I've tested them in production for myself.
Author
Owner

@stale[bot] commented on GitHub (Jan 7, 2019):

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.

@stale[bot] commented on GitHub (Jan 7, 2019): 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.
Author
Owner

@stale[bot] commented on GitHub (Feb 22, 2019):

This issue has been automatically closed because of inactivity. You can re-open it if needed.

@stale[bot] commented on GitHub (Feb 22, 2019): This issue has been automatically closed because of inactivity. You can re-open it if needed.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#1923