memos icon indicating copy to clipboard operation
memos copied to clipboard

Registration validation

Open zdebel opened this issue 1 year ago • 18 comments

Describe the solution you'd like

It would be great if I could manually accept user registrations. When I have for example SSO turned on, anyone can register and use my memos deployment. I'd like to be able to accept who gets access and who doesn't.

Type of feature

User Experience (UX)

Additional context

No response

zdebel avatar Oct 07 '24 09:10 zdebel

So if I understand it correctly you want users to register but restrict their access until you, as the admin, manually review and accept their request and only then they should be given full access.

MehadND avatar Oct 12 '24 07:10 MehadND

Yes, exactly. The scenario is I have a memos instance for family and friends, it's easy for them to use Gmail as an auth option, but random people can also register, that doesn't suite me. If I can review who gets in, it makes it great.

zdebel avatar Oct 12 '24 10:10 zdebel

yeah I never worked on anything like this before but I will try to look into it

MehadND avatar Oct 12 '24 10:10 MehadND

This seems like a sizable feature, regardless of if it gets built, if you arent expecting too many people to join you could turn on registration in the settings till your family/friends registered and then turn off registrations after. Or you can turn off registration and send out manually created logins

RoccoSmit avatar Oct 12 '24 10:10 RoccoSmit

This seems like a sizable feature, regardless of if it gets built, if you arent expecting too many people to join you could turn on registration in the settings till your family/friends registered and then turn off registrations after. Or you can turn off registration and send out manually created logins

but I noticed that the latest version removes the environment variable about public for whether to enable registration or not.

whiletoken avatar Oct 12 '24 12:10 whiletoken

1167df29d8dbb17ec54f3b941c6851faccc06bb6 Command for public was deleted, So, How to enable or disable registration in the current version

whiletoken avatar Oct 12 '24 12:10 whiletoken

That removal is from container startup, its a setting now so you can turn it on and off as you require image

RoccoSmit avatar Oct 12 '24 12:10 RoccoSmit

there is no system settting config on my google chrome, system os is debian and macos catalina, but firefox is working fine

whiletoken avatar Oct 12 '24 14:10 whiletoken

Only host level users get to see the system menu item in settings. Are you logged in with the same user on all browsers?

RoccoSmit avatar Oct 12 '24 23:10 RoccoSmit

image image

whiletoken avatar Oct 13 '24 05:10 whiletoken

Issue is not in English. It has been translated automatically.


image image

Issues-translate-bot avatar Oct 13 '24 05:10 Issues-translate-bot

image image

the first is google chrome, the second is firefox

whiletoken avatar Oct 13 '24 05:10 whiletoken

google chrome version is 129.0.6668.100

whiletoken avatar Oct 13 '24 05:10 whiletoken

Unable to replicate. Do you have any browser extensions in chrome that would remove the content? Or perhaps some customer javascript in your Additional script section

RoccoSmit avatar Oct 13 '24 08:10 RoccoSmit

Unable to replicate. Do you have any browser extensions in chrome that would remove the content? Or perhaps some customer javascript in your Additional script section

thx, you are right,working fine on chrome's incognito mode

whiletoken avatar Oct 14 '24 05:10 whiletoken

In the SSO configuration, there is an identifier filter used to generate a regular expression to filter the allowed identifiers.

https://github.com/usememos/memos/blob/main/server/router/api/v1/auth_service.go#L113

image

johnnyjoygh avatar Oct 15 '24 07:10 johnnyjoygh

@johnnyjoygh this seems like one way to achieve what I want, not very user friendly, but it should work, thanks for the tip!

zdebel avatar Oct 23 '24 15:10 zdebel

I also host a memos site for family members and friends only. I have this workaround:

  • As host user, in Settings/System: enable "Disallow user registration", disable "Disallow password auth"
  • In Settings/Member, create a new user upon request, with an initial password
  • Ask the new user to log in and change their password; if they want, they can also change their "Username" (disable "Disallow Change Username") and "Nickname" (disable "Disallow Change Nickname")

ElTopo avatar Nov 02 '24 21:11 ElTopo