[SOLVED] Problem with Access Controls not Working

13 years 3 months ago - 13 years 3 months ago #150430 by jstec
Hi again.

I have the following scenario where I want 3 levels of users to map onto two levels of news items.

News items are implemented as articles under section/category News/General (publicly accessible per Joomla), and News/Members (accessible only to registered Joomla users). I use a Section Blog Layout menu item called "News" with access set to public to allow all users to access the level of news appropriate to them (I am specifically trying to implement a single menu item without sub-items and be elegant in that the type of subscription determines the content shown).

The 3 levels of users are: non-subscriber (not logged in, as all my registered users will be on one plan or another), free subscriber (intended to have only limited access to certain parts of the site), and paid plan subscribers (full access). All subscribers are set to "Registered" users in Joomla.

My plans do not restrict the menu item at all. Nor is the News/General category restricted. And again, both of these are set to "Public" access per Joomla. Only the paid plan subscribers should be able to see the News/Members articles which are set to "Registered" access in Joomlas. Note that there are no direct access links to the articles (remember I am using Section Blog Layout) and I also don't want an error message to come up (but since they're not directly trying to access the content, I didn't expect one).

What I was hoping would happen is that non-subscribers would see just the News/General items when they click the "News" menu link, paid subscription subscribers would see everything, but free plan subscribers would only see the News/General items that non-subscribers see because the News/Members articles, even though accessible to "registered" level users wuld be blocked bu CBSubs not having them included in the free plan. Instead, the free plan subscribers also see the News/Members items.

Am I not understanding how CBSubs access controls work, or is it possible that CBSubs access control do not "reach into" the rendering that Section Blog Layout does to render the articles? Given what I am trying to do, is there a better way?

As usual, Thanks!

Please Log in to join the conversation.

13 years 3 months ago #150508 by krileon
Replied by krileon on topic Re: Problem with Access Controls not Working
CBSubs does not adjust the rendering layouts or contents of the Blog Layout, etc.. CBSubs directly restricts the section, category, or articles. Best approach is to just protect the Categories themselves, but then you won't be able to display a list of the articles.

You could also use By URL Part and try protecting just a part of the URL displayed when viewing an article so the categories page can be reached and reviewed by non-subscribers. Additional you could protect the articles themselves, but you'd have to re-do this everytime a new article is added.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

13 years 3 months ago #150548 by jstec
Ok, so to make sure I understand, if an article is restricted but the category the article is in is not restricted and all articles are then displayed using a category blog layout, the full article will be rendered? This may be the explanation for the last major issue I am facing which, I think, is related to this topic, so I will post here.

I have a menu item, "Articles", that is actually a sub-menu item of menu item "Resources". I want free plan subscribers to see all items in the menus, which they can. If a free plan subscriber clicks on "Articles", I want to display a list of articles and the "teaser" paragraphs down to the "Read More", and only suggest upgrades when they click "Read More".

So I have implemented menu item "Articles" as a Category Blog Layout. When a free plan (restricted access) subscriber clicks on the "Articles" menu item, the titles and "teaser" paragraph (what is above the "Read More") display as expected, but the access limitation I want to stop at the "Read More" and suggest a paid subscription is not happening. In other words, clicking "Read More" displays the full article.

I am lost in finding the right combination of settings to do what I want. Is this because the Category Blog Layout doe snot know about CBSubs content controls? Any suggestions?

Is there a good tutorial someplace where I can get it straight how the various access permissions interact with each other and also how they interact with and/or over-ride Joomla's standard access levels? I am feeling like such a newbie right now, but this is getting really confusing. Every time I think I know what I need to do, I have to change something somewhere else and I'm having a hard time keeping straight what goes where and what it means.

Please Log in to join the conversation.

13 years 3 months ago #150555 by krileon
Replied by krileon on topic Re: Problem with Access Controls not Working

if an article is restricted but the category the article is in is not restricted and all articles are then displayed using a category blog layout

Correct.

the full article will be rendered?

No, this depends on how you've CBSubs configured on the Integrations tab. You've likely it set to only hide Readmore content instead of the entire article.

I have a menu item, "Articles", that is actually a sub-menu item of menu item "Resources". I want free plan subscribers to see all items in the menus, which they can. If a free plan subscriber clicks on "Articles", I want to display a list of articles and the "teaser" paragraphs down to the "Read More", and only suggest upgrades when they click "Read More".

Simply protect menu links and users will be presented with a subscriptions page. As for the "teaser" please see my above comment regarding configuring CBSubs Content.

So I have implemented menu item "Articles" as a Category Blog Layout. When a free plan (restricted access) subscriber clicks on the "Articles" menu item, the titles and "teaser" paragraph (what is above the "Read More") display as expected, but the access limitation I want to stop at the "Read More" and suggest a paid subscription is not happening. In other words, clicking "Read More" displays the full article.

Are you protecting the article, its category, or its section? Please as in an earlier comment review the CBSubs Content integration configuration.

I am lost in finding the right combination of settings to do what I want. Is this because the Category Blog Layout doe snot know about CBSubs content controls? Any suggestions?

In all honesty it's just a matter of trial and error. I personally don't know how to advise you to get exactly as you're wanting as it's simply not possible for us to test and memorize all configuration scenarios.

Is there a good tutorial someplace where I can get it straight how the various access permissions interact with each other and also how they interact with and/or over-ride Joomla's standard access levels? I am feeling like such a newbie right now, but this is getting really confusing. Every time I think I know what I need to do, I have to change something somewhere else and I'm having a hard time keeping straight what goes where and what it means.

CBSubs comes with a documentation spanning over 400 pages and explaining various use cases. I highly recommend giving it a good read.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

13 years 3 months ago #150581 by jstec
Ok, this is getting really frustrating. I have experimented with a *lot* of different things, but here are my (current) specific settings:
  1. Menu Item (Category Blog Layout type) "Articles" access set to "Registered"
  2. Pertinent Section access set to "Public"
  3. Pertinent Category access set to "Registered"
  4. All articles have access set to "Registered"
  5. User is in "Public Front-En"d group
All of the above is plain Joomla. CB Subs set as follows:
  1. Paid Subscriptions->Settings->Integrations->Content/Extensions Articles Access set to introductions remain always visible (I have tried all settings here, I think). "No Access Restriction for Groups" set to Administrator (so "regular" users should have restrictions enforced)
  2. Plan setting for "By Menu" has "Articles" highlighted.
  3. Plan setting for "READ: By Content Section" has the pertinent section highlighted. If I do not do this, then when the menu item is selected, I get an error because a higher subscription plan is needed and upgrades are suggested.
  4. Plan setting for "Also control the Content Section/Categories Lists" is set to Yes
  5. Plan setting for "READ: By Content Category" does not have the category highlighted(I do not want to grant full access).
And the full article is displayed when the "Read More" button is clicked. I have also experimented with highlighting the category under "READ: By Content Category" and that makes no difference.

What am I missing?

I have tried to find a solution in the documentation. The documentation is excellent for installation, and the use cases show how to configure for what is being shown, but the documentation does not explain what the settings mean and how they work together. And given how places things need to be set, and the terminology similar, there is a lot of room for confusion.

Please Log in to join the conversation.

13 years 3 months ago #150619 by krileon
Replied by krileon on topic Re: Problem with Access Controls not Working
The way you've it configured it should work perfectly fine assuming your articles have the readmore link. Given that the menu protection is working would mean that the cbsubsbot is also working as well as CBSubs Content.

How are you adding readmore breaks? They must be added by way of Joomlas editor button. Alternatively disabling view of the entire article should work just fine. There is a known bug with article permissions however am not sure this is entirely related, but is beginning to seam so.

Please PM backend login credentials so may take a look.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.216 seconds

Facebook Twitter LinkedIn