XF 2.1 Gender Access Restrictions Select Nodes

Chad

Active member
I need to restrict access for 2 specific nodes.

Males cannot enter women only forum and vice versa.

I cannot find an addon for this and I really do not want to create custom usergroups as well.

Any simple way to accomplish this?
 
I need to restrict access for 2 specific nodes.

Males cannot enter women only forum and vice versa.

I cannot find an addon for this and I really do not want to create custom usergroups as well.

Any simple way to accomplish this?
Custom user fields and restricting node access per field for those specific nodes. You probably already have the custom user fields if you're speaking of gender already, so it's really just an issue of a template modification to block access.
 
Simple, maybe 5 line, template modifications would have to be made to forum_view, category_view (in the instance of multiple nodes in one category that is all fe/male only), and thread_view so that someone can't backdoor in (or if a thread is moved into a node, it'd then be blocked).

I don't think I'm missing any other areas...
 
Then comes the conundrum of people changing sexes... but this option solves that.

1577712285611.png

The only thing it doesn't solve is multiple accounts.

(Sorry for multiple replies, just brainstorming ways without user groups, add ons or expensive development)
 
Custom user fields and restricting node access per field for those specific nodes. You probably already have the custom user fields if you're speaking of gender already, so it's really just an issue of a template modification to block access.

I don't see anywhere in user custom fields settings node permission settings where I can set restrictions.
 
I don't see anywhere in user custom fields settings node permission settings where I can set restrictions.
No, you will need to make template edits to those 3 templates.

The custom user field thing is so that people can't freely switch back and forth to gain access.

And...
The easiest way, as far as I know, is by using user groups and user group promotions.

This would be. Look under the "User field criteria" and just create male/female user groups solely for the purpose of defining them in order to add node permissions.
 
I'd take the user group promotion approach.

Create a new user group called:

"Special forum access" (just an example).

Set the node you want to a "private node", then edit the node permissions for the Special forum access and let them "view node".

Then, create a user group promotion that promotes users into that user group when they've filled out a specific custom field (gender). Slight delay for them to get promoted when they fill out the field but this would probably be the cleanest approach.
 
Thanks but I'm not sure what to edit/add there. Can you explain?
I'm gearing towards two new user groups with promotions now. I don't have custom fields on my main site, when I made the first suggestion, but do on my dev; after clicking around, I noticed that user group promotions can be based off of custom fields.
Slight delay for them to get promoted when they fill out the field but this would probably be the cleanest approach.
After setting it up, do you think automatic implementation would be made, assuming gender is already set from the beginning, if the user group promotions cron was manually run?
 
Back
Top Bottom