-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Adds "invite_only" disable_registration config option #1841
Adds "invite_only" disable_registration config option #1841
Conversation
BundleMonUnchanged files (7)
No change in files bundle size Final result: ✅ View report in BundleMon website ➡️ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Let's make the field a bit more restrictive so a random value wouldn't be accepted. But then we can merge indeed
@Vigasaurus Wow! That is generous. let me know if something changes. Thank you for the speedy update. Lets hope theres a release in near future. |
Thanks @Vigasaurus ! @jesperordrup this will be part of the next self-hosted release. Coming soon. |
"coming soon" is of course a matter of interpretation. Initially I held my breath but I found that it wasn't possible 👍😂 |
I'm sorry @jesperordrup, I'm having to deal with some unexpected health issues. The release is coming as soon as possible. |
Oh. Get well and forget my "funny" comment Pls |
* Adds tri-state disable_registration config * Formatting * Changes variable back to atom * Changelog * Uses atoms correctly :/ * Swaps to a more fitting value * Formatting
Hi all. Hope that all is well. Any news? |
hi @jesperordrup! no news at the moment. this is on our self-hosted roadmap but we have no timelines that we can promise. we have limited resources and the self-hosted release depends on the free capacity of our developers. as soon as there's news we will post an update, thanks! |
I know, all fine. I'm aware of the setup. But in the end, it's also about if the setup works for me. This is not your concern, of course. But I of course have to deal with the consequences. Not complaining in any way - as I say - I'm aware of the setup. Just asking because initially it was "coming soon". So I'd thought I just ask. |
our goal is two releases per year. last version was released less than 5 months ago. we're hoping for the next one to be done in the next month or so but no guarantees or promises. we have a goal of twice per year and we hope to make it every time but things are unpredictable as we have limited resources. we will publish the release as soon as it's ready. |
I just tested the the invite_only feature using docker: changed the image referenced in the
and updated
Now I can Invite but when I click on the invitation link im taken to the login screen. Is this where its at or has I missed something`? Clicking the link |
@jesperordrup hi! Could you please try out the new release candidate #2324 and check if it works better there? |
I just tested the new release. What I did
Error What should have happened Recap of what the purpose of invite_only is
|
I'm having trouble reproducing this error on my instance... Can you please check the database to include the invitation, check its timestamp? Can you please post the URL that was sent in the email? Are there any errors in the logs / console? You can also try connecting to your running app with $ docker compose exec -ti plausible bin/plausible remote and then listing the invitations there (please post them here) iex> Plausible.Repo.all Plausible.Auth.Invitation
[
%Plausible.Auth.Invitation{
__meta__: #Ecto.Schema.Metadata<:loaded, "invitations">,
email: "zlobushka666@gmail.com",
id: 2,
inserted_at: ~N[2022-12-14 12:59:09],
invitation_id: "kWkcqBGrobbKT0r9aef1x",
inviter: #Ecto.Association.NotLoaded<association :inviter is not loaded>,
inviter_id: 1,
role: :viewer,
site: #Ecto.Association.NotLoaded<association :site is not loaded>,
site_id: 2,
updated_at: ~N[2022-12-14 12:59:09]
}
] I'm also interested in what this command returns iex> Application.get_env :plausible, :selfhost
[enable_email_verification: false, disable_registration: :invite_only] |
thanks @ruslandoga. This is running on a coolify setup using: Plausible has been updated with 1.51 (its not a new install) The invite url looks like this: When hitting it I get a
When I create the invite the log updates with:
When I click the invite url, nothing happens in log or browser console (other than redirect to login) |
I'm not familiar with Coolify, unfortunately. Does it allow you to connect to the running plausible container the way I showed above? Since it's a not a docker compose setup, can you verify the image is indeed updated and the container is running the new image version, |
I've tried
And ran
Also this one Result (which clearly indicates a problem 🥇 ) Wonder why disable_registration is true. In Coolify I've added this (and redeployed) |
I'd try adding some dummy env vars and checking them from the running container with iex> System.get_env("DUMMY")
"value" If they do show up, then I'd try changing one of them and checking the change with iex> System.get_env("DUMMY")
"updated_value" If new env vars don't show up or are not updated, the issue is somewhere with Coolify. |
I tested some more: When I enter the container and do a It always returns I then added a new environment variable "FISK" to the service
Any changes to this IS updated without problem. |
Could there be multiple places where this env var is set? I see "Secrets" in your screenshot, is there a place for non-secret env vars maybe? Could you try a fresh installation? |
Solved. You're right! Coolify is overriding. They have added direct support for DISABLE_REGISTRATION which does not include invite_only - I've notified Coolify. Im installing in another setup. Thanks for your help |
Aaaand just finished testing on a local docker. Its working great !!! Assuming that it sends out the invite (i just grabbed the invitation id from ( / And it worked! Awesome - I can setup a server. Yay :-) |
Changes
Allows for the
DISABLE_REGISTRATION
config flag to support three states.false
=> registration is allowed as normal, for both normal users and invited usersinvite_only
=> registration is allowed for those with an invite link, but prevented for normal userstrue
=> registration is entirely disabled, regardless of invite status@jesperordrup - after taking a look, this honestly was too trivial to implement for me to actually expect or accept a bounty for it (assuming it is good enough in its current state).
I'll add the docs + changelog entry after confirming the implementation.
Tests
addedupdatedChangelog
Documentation
Dark mode