• Resolved dingdang

    (@dingdang)


    Hello,

    as you have implemented the ability to set logic in the chain with some limits:
    * there is no way to say “logged in users excluding ABC OR logged out users” (why?)
    * the treating as “NO” is not clear if it happens when the page visited doesn’t match the rules AND (OR) the “Who?” part DOES NOT match

    Some bugs happen or it is just a consequence of the bad implementation – let say a role (i.e. logged in user is selected) is limited to view some pages otherwise to redirect to some URL (which works), then when a rule for “not logged in user” is added, for some reason it falls in the first rule and also redirects on the above match (which is nothing related to “not logged in users”)

    I am not sure if the above is clear, but for example:
    * if you set a rule “logged out users” can see “any page of the site” that automatically would mean that logged out users can’t see anything. This shouldn’t be so.
    Why I need such a rule – just because of the bug described early – logged out users (again because they fall in the exception of previous rules) are forced to some redirects. Then this could be fixed with a simple rule as above – just to enable them to see all the pages, but unfortunately such a rule just bans all logged in users.

    How do you propose for example to set up a simple chain of rules to:
    – role A should be able to see just 5 pages including home
    – role B should be able to see just the 5 pages above and 2 other pages, excluding home, and if it is another page, to be redirected to page X (one of the two) (here happens the redirect for not logged in users as well) NOTE: we don’t need to redirect logged out users!)

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter dingdang

    (@dingdang)

    P.S. To be more precise here is a lot simpler question how to do:
    I want the home page to be able to be seen by logged out users and any other logged in user except with a role X.

    I hope you see here the problem of your implementation: if I set a rule for logged our users (to be able to see the home page), that would make all the logged in to be forbidden; if I first set the rule for logged in except.. then the logged out will get forbidden. And the next rule in the chain is ignored.

    Plugin Author Daniel Iser

    (@danieliser)

    @dingdang – Sorry to hear your running into trouble.

    Couple things from the top:

    1. If you need boolean based user targeting, Pro offers “Custom” which expands to a full boolean editor, along with more user rules such as ecommerce based rules for purchase history or subscriptions etc.

      With that you can mix & match use of AND/OR, Groups & Negative rules, no limits.

    2. “Who can see this content” is pretty specific already we thought, but heres a quick breakdown in order of how things are processed on the front end:

      a. The “Who” specifies which users the restriction applies to. We check this first, as if they are allowed, no reason to waste performance checking content matches.

      b. Content rules: or the “What”, specify what content the restriction is applied to, if its not applied to a specific content, you should expect nothing to happen from our plugin.

      c. Protection Method: or the “How” determines how the content will be protected if both the user check failed & content rules matched.

    3. Rulesets are applied in priority sort order, or via a filter all at once.

      Default: Prioritized handling, works for 99% of use cases, simply put highest priority groups up top, lowest at the bottom. Once we find a restriction that matches we don’t check the others.

      For sites with membership levels etc, Gold first, Silver second etc. This ensures highest teir always wins out once matched.

      In your case this may or may not work because you really need to know whether they fit into either group or both.

      Collective: Runs all restrictions, still in order, but applies them all every time, no bailing early.

      This one currently is only enabled with a filter as it requires understanding the nuance issue your actually trying to solve and opting to do this sitewide, otherwise its extremely heavy for most users to enable by accident for sites with 10 levels where Default works great with no performance hits.

      Its in our troubleshooting doc here: https://contentcontrolplugin.com/docs/troubleshooting/basic-troubleshooting-guide/#h-my-restriction-isn-t-working-the-way-i-want

    Let me know if I missed anything.

    • This reply was modified 11 months, 2 weeks ago by Daniel Iser. Reason: fix aweful formatting of lists
    Plugin Author Daniel Iser

    (@danieliser)

    problem of your implementation

    @dingdang – Not sure its really a problem, more of a specific choice towards optimization over brute force where optimization is most appropriate in the majority of use cases.

    See the above solutions, we did consider these scenarios ??, even built in a solution, its just not exposed as a setting at this time as its difficult to explain what it does and why its needed in a single line (or even a paragraph as you rephrased yourself several times).

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Question about limited logic’ is closed to new replies.