plausible / analytics

Simple, open source, lightweight (< 1 KB) and privacy-friendly web analytics alternative to Google Analytics.
https://plausible.io
GNU Affero General Public License v3.0
19.69k stars 1.05k forks source link

Invites don't work when registration is disabled #1706

Closed sergioisidoro closed 2 years ago

sergioisidoro commented 2 years ago

Past Issues Searched

Issue is a Bug Report

Describe the bug

When registration is disabled, it's not possible to invite people to Plausible. To invite someone to the platform we need to change the environment variable, invite people, and then re-enable the flag to prevent unauthorised people from creating accounts.

Expected behavior

While the behaviour is understandable, if a user has a valid invite it should still be possible to register to plausible instance.

The feature for disabling registration (https://github.com/plausible/analytics/issues/86), I thought, was just to prevent random people from creating accounts in the landing page.

Alternatively, we could just add a note in the docs, mentioning that this also applies to valid invites :)

Screenshots

No response

Environment

No response

metmarkosaric commented 2 years ago

thanks for reporting @sergioisidoro! this is expected behavior when registrations are disabled.

jesperordrup commented 2 years ago

How can I invite ppl without allowing anyone to register ?

jesperordrup commented 2 years ago

@ukutaht could you reopen this?

Is it possible to sponsor fixing this to get it out there to self hosting?

ukutaht commented 2 years ago

@ukutaht could you reopen this?

We keep the issue tracker for unambiguous bugs only. I think this one is on the line between a feature request and a bug report - the system works as designed but the design is too inflexible. Based on this I'll keep this issue closed and treat it as a feature request.

Is it possible to sponsor fixing this to get it out there to self hosting?

Not with the core team but we might find contributors who would be willing to work for a bounty. @Vigasaurus interested?

Vigasaurus commented 2 years ago

Yeah, potentially. I haven't looked much at that part of the codebase, but @jesperordrup feel free to reach out via email and we can figure something out.

jesperordrup commented 2 years ago

@ukutaht could you reopen this?

We keep the issue tracker for unambiguous bugs only. I think this one is on the line between a feature request and a bug report - the system works as designed but the design is too inflexible. Based on this I'll keep this issue closed and treat it as a feature request.

Is it possible to sponsor fixing this to get it out there to self hosting?

Not with the core team but we might find contributors who would be willing to work for a bounty. @Vigasaurus interested?

Ok, I've emailed @Vigasaurus and hopefully we get it done. It only makes sense if you're willing to make a release just after test success?

Also this is what I believe is required in high level description:

genox commented 1 year ago

Sorry for bumping this. :) Has there been any progress on this front? I just ended up in the same situation - trying to invite someone to a project with general registration being closed. IMHO it makes a lot of sense to have the option of an invite-only instance. We want to invite team members but not allow anybody to register and add sites at random.

ruslandoga commented 1 year ago

@genox 👋

Yes, it has been implemented and released in v1.5. You can configure it by setting DISABLE_REGISTRATION=invite_only.

genox commented 1 year ago

Wonderful, thanks so much!

stefanv commented 1 year ago

Should this be added to the README?

ruslandoga commented 1 year ago

@stefanv 👋

It'd probably not make it to the README since it's not (just) about self-hosting, but I'll open a PR into https://github.com/plausible/docs to update https://plausible.io/docs/self-hosting-configuration#server with DISABLE_REGISTRATION=invite_only option description tomorrow.

UPDATE https://github.com/plausible/docs/pull/350

stefanv commented 1 year ago

Thanks @ruslandoga!