Support » Plugin: Restrict Content by Role » Restricting content to a role also restricts to public users and admin users

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Matt Watson

    (@mwtsn)

    Thanks for this,

    I’ll take a look at this as a first priority as soon as I get time (likely next week).

    Matt

    (@mhuntdesign)

    Thanks! Looking forward to it since it solves a project requirement.

    Matt

    (@mhuntdesign)

    Matt W,

    I did some extensive testing, removing all plugins, changing the theme and nothing worked, so I compared configurations. The issue happens after you check off any of the roles within this section of the settings:

    Public Access Roles

    Check the user roles that you do not wish to be available for selection via the Public Access metabox.

    Exclude Public Roles:

    If you leave the setting alone, the plugin works as expected.

    -Matt

    Plugin Author Matt Watson

    (@mwtsn)

    Hi mhuntdesign,

    I have tried to recreate the issue, but cannot. Can you send a screenshot of how you have the settings configured on a page that you are having the issue with?

    Just to check, in order to prevent a subscriber from viewing the page unless they are logged in, you should only see the subscriber checkbox checked. Is this how you have it configured?

    Matt

    (@mhuntdesign)

    Matt W,

    So here’s the way to reproduce: under the About page of the site, I want to limit only Subscribers from seeing the page. I do not want to limit Public Users (anonymous users) or anyone else. I decided Subscribers are not worthy enough to see the About page. Is that possible? It seems once I check on any roles, the access is removed from the Public Users.

    Below is the only thing I have configured on said About page:

    Restrict Access by User Role

    Choose the User Role(s) that you wish to restrict.

    [Subscriber is checked]

    Thanks again!

    -Matt

    Plugin Author Matt Watson

    (@mwtsn)

    Hi mhuntdesign,

    Got it! I’m afraid when you limit a page it will remove it from public view. This is because you need to be logged in, in order to check the users role to ensure they can have access to the page.

    Also, with the logic you have, if a subscriber doesn’t log in, and the page is available to the public, then they will be able to see that page, making the restriction void.

    I am aware that I need to update the UX of the plugin to make it clearer that if you restrict a role the page is no longer publicly available.

    I hope that makes sense.

    Matt

    (@mhuntdesign)

    Hi Matt W,

    I see now. The reason for using the plugin was because there is a certain page I want to restrict for a custom role. We have Woocommerce and I don’t want the custom role we created to be able to access the ‘My Account’ section, since that role does not need to purchase anything and should not be able to access their account to change anything. So I was hoping this plugin was able to do that based on what the UI appeared to be saying. I assumed that if that user was logged in, it would check to see if that is the user that was checked and then restrict the page.

    Thanks for your help.

    -Matt

    Would it be possible to default have a role checked. Perhaps by custom coding? In this way you always have a default content protection.

    Thanks Martin

    Plugin Author Matt Watson

    (@mwtsn)

    Morning Mcrielaard,

    There is nothing currently that enables you to have a default role checked, but I will look into adding in the relevant hooks in a later release.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Restricting content to a role also restricts to public users and admin users’ is closed to new replies.