Skip to content
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

ALLOW_ONLY_EXTERNAL_REGISTRATION Appears to have no effect #4226

Closed
2 of 7 tasks
internalfx opened this issue Jun 11, 2018 · 13 comments
Closed
2 of 7 tasks

ALLOW_ONLY_EXTERNAL_REGISTRATION Appears to have no effect #4226

internalfx opened this issue Jun 11, 2018 · 13 comments
Labels
issue/stale type/enhancement An improvement of existing functionality

Comments

@internalfx
Copy link

  • 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

@techknowlogick
Copy link
Member

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

@internalfx
Copy link
Author

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

image

@L-P
Copy link

L-P commented Jun 13, 2018

Do you have any external auth configured?

auth

@internalfx
Copy link
Author

yep, two of them....

image

@L-P
Copy link

L-P commented 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

@lafriks lafriks added the issue/duplicate The issue has already been reported. label Jun 19, 2018
@lafriks
Copy link
Member

lafriks commented Jun 19, 2018

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

@lafriks lafriks closed this as completed Jun 19, 2018
@internalfx
Copy link
Author

@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.

@lafriks lafriks reopened this Jun 19, 2018
@lafriks
Copy link
Member

lafriks commented Jun 19, 2018

As I said feel free to reopen :)

@internalfx
Copy link
Author

@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.

@coolaj86
Copy link
Contributor

coolaj86 commented 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
Copy link
Contributor

coolaj86 commented Oct 6, 2018

I've begun work on a fix for this: #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 #5006, #5029, #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.

@lafriks lafriks added type/enhancement An improvement of existing functionality and removed issue/duplicate The issue has already been reported. labels Oct 7, 2018
@stale
Copy link

stale bot commented 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 stale bot added the issue/stale label Jan 7, 2019
@stale
Copy link

stale bot commented Feb 22, 2019

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

@stale stale bot closed this as completed Feb 22, 2019
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
issue/stale type/enhancement An improvement of existing functionality
Projects
None yet
Development

No branches or pull requests

5 participants