Restricting users by area

Started by pepf, March 02, 2021, 02:26:28 AM

Previous topic - Next topic

pepf

Not sure if this is the right place to post...

What is the best way to restrict users of a regional forum to a specific country or area at or before registration? Is there a way to display a message if someone from outside that country/area tries to register?
I know access could be restricted via htaccess, but the intention is not to completely prevent access or viewing for others, they should just be unable to participate in the discussion.

Thanks for any suggestions.

Aleksi "Lex" Kilpinen

The short answer is there really is no trustworthy working solution to that, unless you want to ask for ID and proof or residence from everyone and go through them manually before giving access.

Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

SpacePhoenix

Quote from: Aleksi "Lex" Kilpinen on March 02, 2021, 05:59:31 AM
The short answer is there really is no trustworthy working solution to that, unless you want to ask for ID and proof or residence from everyone and go through them manually before giving access.

You'd then be having to deal with data protection laws

Kindred

Well, it depends how you mean to control access...

Making the forum visible for everyone (guests) without allowing them to POST is easy...  That's the default setup.

Making certain areas limited access posting is also easy. That's controlled by Membergroups.

Your complication is asking "how do I assign a membergroup at registration time"
There is no good, automated way to do that.

If you just want to make "joinable groups" which can be chosen at registration, then there is this mod: https://custom.simplemachines.org/mods/index.php?mod=2716
That allows the USER to pick the group that they wish to belong to at registration.
However, doing this would allow a user to join any/all groups, since each of the groups in that list must be freely joinable (at any time) in order to work.

the only other way would be to make a bunch of requestable groups -- and, in your registration instructions, tell the user to request access to the specific group which fits them
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Steve

Quote from: Kindred on March 02, 2021, 11:56:05 AMHowever, doing this would allow a user to join any/all groups, since each of the groups in that list must be freely joinable (at any time) in order to work.

Wouldn't having just one freely joinable membergroup work?
DO NOT pm me for support!

Aleksi "Lex" Kilpinen

It would if it is just a question of "Do you live in X or not". But from the OP's question, I gathered that something more reliable and more automatic was actually wanted.
Like an IP geolocation filter.

Quote from: pepf on March 02, 2021, 02:26:28 AM
What is the best way to restrict users of a regional forum to a specific country or area at or before registration? Is there a way to display a message if someone from outside that country/area tries to register?
I know access could be restricted via htaccess, but the intention is not to completely prevent access or viewing for others, they should just be unable to participate in the discussion.
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

pepf

Hi Aleksi, just wrote the following while you posted.

Thank you all for your comments. So it is as I suspected. I do not really know if there will be a problem, of course, but  prevention is better than resolving problems later. The alternative would be to put up another  one that is all private, and channel specific members there.

The forum I'm preparing is for Taiwan, Chinese language, which should be predominantly for locals. I say locals because it does not really matter if Chinese from HK, SE Asia or overseas Chinese in general participate. What I'm a bit worried about is that if those from China participate there might be problems, purely due to the much larger numbers; that might make those for whom the forum is really intended for a weak minority. I will look into the joinable groups mod, but free choice may not be something to count on, in this case.

>Your complication is asking "how do I assign a membergroup at registration time"

Yes, best would it be if I could prevent those others from registering in the first place, without offending anybody.  :)
Maybe I still have to block certain IP ranges from accessing the site at all.

Thanks anyway.

Advertisement: