We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 22377 ☆ A M B ☆
    • 33 Posts
    What i want to do: i added an extra tab at the top which links to a front-end page of the website. I want to make that page available to a manager user only if he logs in the MOD x control panel at the back. Note, there is no front-end login system.

    Is this possible? So far i can’t make it work, seems like web users and manager users are completely separate, and in order to manage access to web pages from the front-end i need to use a web-user.

    But this isn’t right.. i mean, a siteadmin should be able to view the pages that a regular user can see after he logs in.

    What i have tried:
    1. created a web document group named "admin pages".
    2. added the page in question to the group.
    3. added a web user group named "admins".
    4. added the "siteadmin" web user to the "admin" web user group.
    5. linked the web user group "admins" to the web document group "admin pages".

    Result: can’t view the page in the front-end after i log in as "siteadmin" in the backend.

    Suggestions? Thanks !


    EDIT: still haven’t gotten it to work the way described above, but i figured out an alternate solution, bypassing the need to use any document groups or permissions.

    i can just create and call a snippet which contains:

    <?php if(isset($_SESSION['mgrValidated'])){
       //my page content here (chunk or snippet output passed in trough a snippet parameter)
    }
    ?>


    This is similar I think, to how quickedit works. It would have been more elegant to solve the problem with permissions, but if it’s not possible, this is what I’ll be doing.

    Does anybody see a better way? Still looking for suggestions smiley
      • 21459
      • 10 Posts
      I don’t know if you’re still looking for a solution for this, but I had the same problem and I found this post: http://modxcms.com/forums/index.php/topic,2322.0.html.
      Basically, it automatically logs in/out any manager user as a web user too, thus allowing this manager user to access specific documents in the front-end. You only need to create that particular web user, type its log/pass into the plugin code and grant it access to the desired documents via usual web permissions.
      That solved the problem!