FriendsOfFlarum / doorman

🚪 Only allow certain people to join your forum
MIT License
25 stars 15 forks source link

Optional setting isn’t working. #55

Open ryanjlind opened 1 year ago

ryanjlind commented 1 year ago

Bug Report

Current Behavior When trying to register without an invite code, registration is blocked with a “Please enter an invite code” error, despite the fact that we have “allow public sign up” enabled.

Steps to Reproduce

  1. Go to the admin panel
  2. Click to enable “Make invite code optional when signing up.”
  3. Log out
  4. Attempt to sign up for an account without an invite code
  5. An error is received “please enter an invite code.”

Expected Behavior Users should still be able to register even if they haven’t received an invite code (which just adds them to a special group.)

Screenshots IMG_2359 IMG_2363

Environment

Output of "php flarum info", run this in terminal in your Flarum directory.

Possible solution(s)

Additional Context Add any other context about the problem here.

dsevillamartin commented 1 year ago

When the optional setting is enabled, the placeholder of the input should say "Invite Code (optional)". I just downloaded this ext, enabled the option, and it works just fine.

image

So I feel like the setting isn't really enabling for some reason? What does app.forum.attribute('fof-doorman.allowPublic') return in the browser's developer console?

xrtze commented 1 year ago

For me it is the other way around: Disabling the optional invite code does not work. When I reload the admin panel, it is reset and sign up without a code is possible-> Huge security issue and core feature of the app defectuous.

ryanjlind commented 1 year ago

When the optional setting is enabled, the placeholder of the input should say "Invite Code (optional)". I just downloaded this ext, enabled the option, and it works just fine.

image

So I feel like the setting isn't really enabling for some reason? What does app.forum.attribute('fof-doorman.allowPublic') return in the browser's developer console?

You are correct. It was not enabling properly. We disabled the extension and when reenabling it, we were able to get it to work, but it’s finicky for sure.

bigreja commented 1 year ago

I think it's a UI problem, on the database the value is set properly, but on admin refresh button status is always enabled, i will check the code, and try to fix it, if it solves I will submit the change