We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36695
    • 47 Posts
    My site uses multiple contexts to handle different sub domains. I want to have front-end users on a per-context basis, and have user groups and resource groups set up accordingly. This is is working OK.
    In addition, I want an administrator for each context who can log in to the manager and manage only users that are members of the current user group. Currently, if a user has manager permissions and permission to manage users they can see all users.
    In short, I want an administrator that belongs to User Group Alpha (and user group Context Admins) to only be able to view, add, edit and delete users in User Group Alpha.
    Is that possible using the built in ACL functions? Or would I need to create a CMP to abstract the user management bit?
      • 3109 ☆ A M B ☆
      • 894 Posts
      This can all be done using ACL and Roles just make a User Group for each context and an Admin group for each context and assign different roles to each, use Resource Groups to assign what each User Group can have access to.

      Make sure to read these tutorials:

      http://rtfm.modx.com/display/revolution20/Security+Tutorials

      http://rtfm.modx.com/display/revolution20/Roles

      http://rtfm.modx.com/display/revolution20/Resource+Groups

      http://rtfm.modx.com/display/revolution20/User+Groups

      http://rtfm.modx.com/display/revolution20/Security

      You can also check out my tutorial: http://www.bmv-interactive.com/home/modx-acl-tutorial.html

      Good Luck.
        Benjamin Marte
        Interactive Media Developer
        Follow Me on Twitter | Visit my site | Learn MODX
        • 3749
        • 24,544 Posts
        I could be wrong, but I don't think that's going to work, because AFAIK, Users and User Groups don't have a context. ACLs will protect Resources and Elements, but I don't think at present they can be used to protect Users or User Groups.



        ------------------------------------------------------------------------------------------
        PLEASE, PLEASE specify the version of MODX you are using.
        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
          • 36695
          • 47 Posts
          Thanks for your responses. BobRay - I think that is what I was coming up against. I thought maybe I'd missed something, but given the number of times I've visited your site, I trust your second opinion ;-).
          I guess it's a custom solution then: removing the Security/Users menu item altogether and creating a CMP to manage users that are "pre filtered".
            • 3109 ☆ A M B ☆
            • 894 Posts
            Ah I misunderstood what you wanted to do so yes as Bob said a CMP is needed or a Front End User management page so admins can do it via the front end.

            I just recently accomplished this and will be writing a tutorial soon and posting it on CMSTricks
              Benjamin Marte
              Interactive Media Developer
              Follow Me on Twitter | Visit my site | Learn MODX
              • 36695
              • 47 Posts
              Great stuff benmarte! Will you have your tutorial finished in the next 48 hours...
              Despite all the forums and online support, I really would like to sit down and talk some of these aspects through with someone who knows a bit about it. I often create fairly complex sites/apps and always feel as if I'm winging it with all this ACL stuff. This hasn't been helped by mistakenly working on the develop git branch for a while, and wondering why everything kept breaking...
                • 3749
                • 24,544 Posts
                You wouldn't *have* to use a CMP. One thing I do sometimes is to use a snippet to manage things in the front end that only runs for specific users: (logged-in users, logged-in users who belong to a specific User Group, or users who are previewing from the Manager). That's very easy to do compared with writing a CMP (especially if you are not fluent in ExtJS and modExt).


                ------------------------------------------------------------------------------------------
                PLEASE, PLEASE specify the version of MODX you are using.
                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