MG 1.1 Category "Can View Media" – but what if one user group shall "not view category"?

Freelancer

Well-known member
As the title implies: Right now you can set the permissions for each category by check-marking those who can see the category. Now I have one additional user group that is like a "Trial" group. They are primarily "Registered" users as the rest but additionally in the "Trial" user group and they should not be able to see the specific Media Gallery category until their "trial period" is over.

Given that I can not "revoke" permissions in the current XFMG category permissions system, what would be the best practice to achieve my goal?
 

Chris D

XenForo developer
Staff member
It's tricky.

Ideally you would need a user group promotion that adds people into a "Not Trial" group when they are NOT a member of the "Trial" group.

In that case, you would just check "Not Trial" to view that category, and leave (presumably) Registered and Trial unchecked.

The permission system is being updated for XFMG 2.0 so category permissions work the same as node permissions - i.e. you would, in that case, just revoke the permissions in that category for the "Trial" group, and you wouldn't need the "Not Trial" group any longer.
 

Freelancer

Well-known member
I made a "Category Access" group and used the User Group Promotions and it works. Only Drawback is the Cron is running every 20 minutes, so once I am switching users I need to think of running the Cron manually and it works. Brilliant, thanks Chris.
 

Chris D

XenForo developer
Staff member
Promotions valid for a user should trigger when that user logs in.

You mention switching users though so I don't know if that means it's done via an addon.

It's possible an add on that switches users can skip the promotion running but for normal users logging in they should ordinarily apply automatically and not via a timed Cron.
 

Freelancer

Well-known member
It is somewhat more complicated.

I double use the "custom field to user promotion trick" if you want to. I made a custom field that can switch between "Trial" and "Clear" (only admin can do so in the acp), he is added to the user group "Trial" via a user group promotion. I then created a second user group promotion as per your tip, that if "Clear" is selected, adds him to "Category Access" user group which then has access to that specific category.

Log off and in does not switch the user state, I have to run the cron job. Do I miss something in the logic? :unsure:
 
Top