We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 26805
    • 11 Posts
    Hello,

    I'm right now trying to get my modx driven website to ignore an active manager login. I'd like to have my site show some resources only to users explicitly logged in to the frontend. But I can see them, regardless of being logged in to the frontend or not. I am however logged in to the manager. After logging out from the manager I can't see the resources anymore.

    I haven't really understood the security system of modx up to now. Feels like a pain in the *** (sorry). Why is it so damn complicating?

    Anyway, can anybody help me creating a resource group that is only affected by web context/frontend login and not by mgr context/backend login?

    Thanks a lot!

    Cheers,
    Hendrik
      • 3749
      • 24,544 Posts
      These instructions are for MODX Revolution.

      Delete any *Resource Group* Access ACL entries with a context of 'mgr'. In fact, you can delete all Resource Group Access ACL entries for all User Groups -- there aren't any in the default install.

      Then, create a new Resource Group Access ACL entry connecting the Resource Group (containing the resources you wan to hide in the front end) with the User Group (containing the users who should see the private resources in the front end).

      Add yourself to the user group with a role of Admin Super User so you don't hide the resources from yourself.

      Clear the cache, Flush permissions and Sessions.

      Test from a different browser where you're not logged in to the Manager.


      ---------------------------------------------------------------------------------------------------------------
      PLEASE, PLEASE specify the version of MODX you are using . . . PLEASE!
      MODX info for everyone: http://bobsguides.com/modx.html
        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting
        • 26805
        • 11 Posts
        My goodness... this is damn complicating.

        Looks like I cannot isolate backend and frontend login from one another. Is that right? It's not possible to have a user that has administrative rights in the backend but gets treated like a guest in the frontend when not logged in there explicitly, right?

        Thing is, I've got two resources which are treated differently for being a guest and being an authenticated user:

        • Contact Info
        • Team Leader Area

        First one should be visible to guests only, second one to "Team Leaders" only. "Team Leader" is defined as a role. Vice versa, first one should be hidden from all logged in users, second one should be hidden from guests and users with a lower role than "Team Leader".

        I've got some user groups with given users:

        • (anonymous)
        • Administrators
        • Club Members

        Administrator:

        • SeveQ (Super User - 0)

        Club Members:

        • SeveQ (Team Leader - 7777)
        • Another User

        With "SeveQ" being logged in to the manager, "SeveQ" can also see resources in the frontend that are for "Team Leaders" only. Regarless of being logged in to the frontend.

        But "SeveQ" wants to be treated like a guest in the frontend even though he is logged in to the manager. He must not see "Team Leader" resources unless he also logs in to the frontend.

        Is that possible at all? Or doesn't modX provide distinct treatment of manager and frontend logins with the same user and the same browser?

          • 3749
          • 24,544 Posts
          If I'm understanding you, it's possible, though it's more straightforward in Evolution where there are separate Web Users and Manager Users.

          In Revolution, when you log into the Manager, you're not logged into the 'web' context. When you log into the front end, you're generally not logged in to the Manager (unless you explicitly make alter the Login snippet tag to do so).

          That means you can have permissions that are independent for the front and back end.

          In fact, I think what you're describing is the default behavior except that a Manager user can see unpublished docs when previewing the front end unless you take that permission (view_unpublished, IIRC) away.

          ---------------------------------------------------------------------------------------------------------------
          PLEASE, PLEASE specify the version of MODX you are using . . . PLEASE!
          MODX info for everyone: http://bobsguides.com/modx.html
            Did I help you? Buy me a beer
            Get my Book: MODX:The Official Guide
            MODX info for everyone: http://bobsguides.com/modx.html
            My MODX Extras
            Bob's Guides is now hosted at A2 MODX Hosting