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

feat: add public flag instead of system setting to enable signup #3589

Merged
merged 1 commit into from
Jun 19, 2024

Conversation

johnnyjoygh
Copy link
Collaborator

Because disabling registration as well as disabling password login may lead to some unforeseen problems: users can't sign in and need to modify the database. So it is recommended to put it into an environment variable.

Copy link
Collaborator

@boojack boojack left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@boojack boojack merged commit 736637a into usememos:main Jun 19, 2024
4 of 5 checks passed
@evanlihou
Copy link

Hey there! Definitely agree with the change for disabling signups to be an env variable, but this PR removes the ability for an instance to allow only SSO logins. Is that no longer a supported use case?

Also, the new flag is not documented

@johnnyjoygh
Copy link
Collaborator Author

@evanlihou If public is turned off, new users can't register and old users can log in via password or SSO. So I'm wondering why password login should be not allowed, is there any security issue?

@evanlihou
Copy link

@johnnyjoy101 Nah I don't see it as a security flaw, it's more a matter of providing customizability to instance administrators and reducing confusion for the users.

For example, a small business that uses memos to share snippets internally. All users log in via SSO, maybe once every few years an admin needs to log in with a password because something broke in SSO. The users not needing to think to themselves "Should I type in my Active Directory username and password here, or should I click this 'Sign in with...' button?" It's a small thing for sure, but it is a regression from the previous version.

Not trying to throw work at you btw! I'm happy to open a PR myself, I just wouldn't want to step on any toes. Also I wanted to give @boojack a few days to chime in and disagree with me

@johnnyjoygh johnnyjoygh deleted the feat/add-public-flag branch June 30, 2024 13:15
@boojack
Copy link
Collaborator

boojack commented Jul 1, 2024

@johnnyjoy101 @evanlihou It looks like the public parameter will not cause any security issues now, so I prefer to work with a simpler configuration with fewer parameters. If you can come up with such a configuration and minimize it, a PR would be welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants