Configuring a la carte site model: multiple subscriptions with overlapping access rules

I am struggling to figure out how to set up the membership plugin for an "a la carte" content model.

My goal:
* By default, all users should be restricted from all site.com/content-type URLs
* A subscriber who belongs to the "content-area" subscription level should be permitted access to all site.com/content-type/content-area URLs. There are multiple content-area slugs, with a separate subscription level and access level for each

My current setup:
* Unregistered users are put into a free subscription, which has an access level with a negative rule: no site.com/content-type URLs (via regex)
* Subscribers to content-area1 are put into an access level that gives a positive access to site.com/content-type/content-area1 URLs, and likewise for content-area2, etc.

Actual result:
* Users who are only part of the free subscription see the non-content-type areas of the site fine and are blocked from the content-type areas. (OK)
* Users who are only part of the content-area1 subscription see only the content-area1 areas (OK)
* Users who are part of both the free subscription and content-area1 subscription are blocked from everything (NOT OK--expected result is that they could see everything non-content-type because of free subscription, and also have access to content-area1).

Is there a different way to set up the access levels/subscriptions so that I can add content-area subscriptions a la carte on top of the free user subscription?

  • Alexander

    Hi @jimesten,

    In Membership, subscriptions can't in anyway inherit from other levels. This means a user must either have multiple subscriptions active on their account, or you'll need to setup your access rules to include content from previous levels as well.

    The easiest way to do this is create your initial access level, then clone it and add more features. So each of your "content areas" should begin as a clone of a more basic access level that you create first

    You'll also need to be careful, as using both positive and negative rules can have unpredictable results. When in doubt, I'd recommend sticking to positive rules

    I hope this helps! Let me know if there's anything else I can clear up here.

    Best regards,

  • Patrick

    Hi @jimesten

    The issue is that your free level has a blanket negative rule applied to all content-type/* URLs. But the content-area1 subscription has a positive rule for content-type/content-area1. Result is conflicting access rules.

    That conflict is all to easy to arrive at when setting up multiple concurrent subscriptions with mixed positive and negative rules on various access levels.

    The only sure-fire way to prevent that is to create subscriptions with increasing access levels to enable your users to upgrade to gain access to additional content.

  • jimesten

    I understand what you've said, but I don't think you understood my question so I'll try again.

    I need to exclude part of the site from basic access, and restore access to a sub-part of the blocked section by subscription. So, by default the /content-type slug will be blocked, but subscribers can enable the subarea /content-type/content-area1, /content-type/content-area2, etc.

    What is currently happening is that the individual subscriptions work fine, but someone with both the default and content-area1 subscription ends up blocked from everything, when I want the content-area1 subscription to add to what the default subscription can see.

    Since the site will expand beyond just the slug in question, using positive access for the default subscription is going to be infeasible. I can't reasonably modify default access level to include an explicit listing of every page, post, etc. that gets added to the site in the future.

    There must be a way to implement an a la carte model like this, but I need some assistance in understanding how multiple subscriptions work when they mix positive and negative rules.

  • jimesten

    I've attempted to implement an all-positive rules model, but it's still not working.

    The current setup is that the free subscription and default access level permit a regular expression of pages (positive rule, URL group). A content-area subscription provides positive access to another URL group.

    A user with a free subscription sees what he is supposed to. Same for a content-area subscription. But the user with both subscriptions sees nothing, when they should be able to see the content for each area.

    I would appreciate some assistance in resolving this issue. Again, I have switched to using all positive rules, but even so they seem to break down when a user has multiple subscriptions.

  • Patrick

    @jimesten

    I do understand the issue you've described, and I've been trying to get it to work also on my test install.

    The problem is in getting the access rules to play nicely with each other when multiple concurrent subscriptions, with conflicting access rules, are active on the same account.

    I'm going to bring this up at our next development meeting (this Thursday) to get several heads together to figure this out.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.