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

    I am working on a site for a client that requires a front-end login for their customers, ideally then redirecting to a specific resource per customer. Basically like a 'home' page for each user that would contain custom information/links/etc.

    I have a decent understanding of ACLs and groups but not sure how exactly to achieve this with MODX. The Login package of course but not sure beyond that. It almost seems that I would need to create a separate group per user then limit their resource to that specific group.

    I guess in a nutshell, is there an easy way to limit a resource to a specific user outside of a group per user? Seems like there should be a creative way of doing this with minimal duplication.

    I have checked the forums / Bob's guide /etc but most information seems to be more focused on groups and not a specific user.

    thanks in advance.
      • 3749
      • 24,544 Posts
      I think you're on the right track. If you're using the ACL system, you really do need one user group for each user and a resource group for each resource, since the permission system only operates on groups of users and groups of resources at present.

      You can write a plugin that will create the user group and the resource group (both based on the user's username) when the user is created, which will make it a little more convenient.

      There's an example in my book that explains how to create a tree_root_id user setting to restrict users to individual pages (or groups of pages under the same parent). The downside, though is that extras like Wayfinder and getResources won't respect your settings and will show all resources to all users (though they won't be able to actually go to the resource pages).


      ---------------------------------------------------------------------------------------------------------------
      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