• Resolved Wayne Smith

    (@waynesmith1971)


    I’ve read through these support forums and although I can’t find the answer to my specific question, I have read a lot of praise for this plugin so while I may find it quite confusing and not very intuitive, I am prepared to stick with it because those who do get it to work seem to think its worth the effort.

    So, here’s my problem.

    I created a website to showcase a brand new property and I want to initially restrict access to the website to just the estate agent dealing with the sale, and the property developer.

    I have created a user login page and within my WordPress dashboard I have 3 users: 1 x Administrator (me), 1 x Estate Agent and 1 x Developer.

    I have deliberately not allowed new users to register just so I can restrict only those two members access.

    The website has 3 pages: Home / Overview / Login

    The Administrator naturally has access to everything
    The Developer should have access to Home / Overview / Login
    The Estate Agent should have access to Home / Login

    The Overview page contains information just for the Property Developer and I do not want the estate agent to access this page.

    How would I go about setting up this scenario? I have tried different combinations but I can’t seem to get it to work correctly.

    I want to restrict access to the home page for anyone not logged in, and redirect them to the Login page, but because the Home page displays automatically when the user navigates to the website address https://www.mywebsite.com, I can’t find a way to restrict access to a page within WordPress called ‘Home’

    Am I missing something because other people seem to find this plugin really easy, but I am struggling and I would love some help.

    Many thanks in advance
    Wayne

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Joachim Jensen

    (@intoxstudio)

    Apologies for the lack of documentation, hopefully I will have time to add something soon.

    For your use case, you should create 2 levels. Admins will have access to everything regardless of the levels you create.

    Estate Agent Level
    Conditions: Home
    Redirect: Login

    Developer Level
    Conditions: Overview
    Redirect: Login
    Extend: Estate Agent Level

    This should restrict access to the Home and Overview pages. Because the Developer Level extends the Estate Agent Level, it will inherit all its restrictions and capabilities.

    When a user isn’t logged in, he ought to be redirected to the Login page.

    Let me know if this setup works for you.

    Thread Starter Wayne Smith

    (@waynesmith1971)

    Hello Joachim,
    Thank you for taking the time to reply to my support request.

    Unfortunately I have come up against a problem almost straight away, in fact its the same problem I was experiencing before but I just assumed I must be doing something wrong.

    When I create a New Access Level and name it Estate Agent Level, I select Pages in the Content type drop-down box but there is no page called Home showing in the list when I try to select it, even though that page is present in my Pages folder.

    My first thought was it may have something to do with it being the home page, in that its what the website serves when a user visits the main URL, but that just seems odd.

    I’m scratching my head wondering if I’m doing something wrong.

    Any ideas?

    Thanks
    Wayne

    Thread Starter Wayne Smith

    (@waynesmith1971)

    Just to update you on where I am with this, I haven’t yet found a solution to my problem but this is my current situation:

    I have discovered that whatever page I make the ‘homepage’ I cannot select that page in the Conditional Logic drop-down box, it just doesn’t appear.

    To test this theory I created a new page with some random text and saved it as ‘mypage’ – I then navigated to my WordPress dashboard to Settings > Reading > Front Page Displays > and selected ‘a static page’ followed by the newly created ‘mypage’ from the drop-down box.

    I then navigated back to User Access > Access Levels > Estate Agent Level > and tried to select the page called mypage from the drop-down box within the Conditional Logic element, but it wasn’t there. A page called ‘Home’ was there however (this is the page I previously set as the home page)

    If I then go through this process once more and reassign ‘Home’ as the home page, I can now see the page called ‘mypage’ in the drop-down box within the Conditional Logic element of the Estate Agent Level.

    This is really frustrating because I need to restrict access to the home page for anyone not logged into the website, and redirect them to the Login page.

    Also, if I log in using the estate agent credentials, I cannot view or access the Overview page – this is exactly what I expected. However, if I log in with the developer credentials, I can see the Overview menu item at the top of the page – again this is what I expected to happen, but when I click on the Overview link it redirects me to the Login page (Ahhhhhhh !!!!).

    Can you see now why I’m pulling my hair out trying to get this to work properly.

    If you can see anything obvious what I might be doing wrong, I would greatly appreciate your feedback. I’m even prepared to set up a temporary user account with Administrator privileges for you to log into my website and check everything yourself, just to satisfy yourself that I have configured your plugin correctly.

    Other than that I am quite lost for a workable solution to this problem and would love to get it to work properly, if you have any other suggestions.

    Many thanks
    Wayne

    Plugin Author Joachim Jensen

    (@intoxstudio)

    I forgot to say that when you want to select the Front Page, you should use the Static Pages condition, not the Pages condition. This might be a little confusing and I am still figuring out if there is a better name than Static Pages.

    Let me know if this fixes the problem with the Overview restriction too, otherwise you could create an admin user for support [at] dev.institute so I can take a look at it and see if there is a bug?

    Thread Starter Wayne Smith

    (@waynesmith1971)

    Incredibly, that was the problem all along.

    Its hard to describe how much I have played around with the settings and configuration of this plugin, but it never occurred to me once to try and change it from Pages to Static Pages, but it works now – brilliantly too I might add.

    Thank you for your help Joachim, I could not have got this working properly without your help and for that I am very grateful.

    Thank you for taking the time to help me resolve this problem

    Many thanks
    Wayne

    Plugin Author Joachim Jensen

    (@intoxstudio)

    Great that it works now!

    As I do agree that “Static Pages” might be a confusing term, do you have any suggestions for what would be a better name for those kind of pages (front page, 404, search)?

    If you have time, it would mean a lot to me if you could support the plugin with a review here: https://www.ads-software.com/support/plugin/restrict-user-access/reviews/

    Perhaps something like WP Core Pages…. or WP Pages, or Root Pages? Or Special Pages?

    Alternatively, Pages (WP), Pages (Home,404,Search Results).

    Or… the simplest route would be provide Home Page, Search Results, as their own menu items, and map them on the backend to the same thing as whatever “Static Pages Are”

    Home and Search are probably restricted enough to warrant their own place on the list anyhow.

    Plugin Author Joachim Jensen

    (@intoxstudio)

    @bluemeansgo

    Thank you for your feedback! I agree that putting them in the content type dropdown would be the most intuitive, but as I plan on expanding the “Static Pages” in the future, that dropdown could easily grow very big (especially when the user has enabled custom post types and taxonomies).

    Core Pages or WP Pages could be a good idea, I have thought about Misc (very vague) and Custom Endpoints (very technical) myself.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Restricting access to a website except for two specific users + Administrator’ is closed to new replies.