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

Answered ACL

    • 40088
    • 708 Posts
    Mine was AllDocs.

    I changed it to allDocs but still nothing. Could you post a detailed step-by-step of how you did it? Maybe that will show me where I went wrong. [ed. note: todd.b last edited this post 13 years, 11 months ago.]
      Todd
      • 10208 ☆ A M B ☆
      • 1,780 Posts
      I think I know what's wrong. In Bob's example, the php header is miss-typed. And I assume you do actually have a resource group named allDocs, correct?

      <?php
      /* SetResourceGroup Snippet */
       
      $resources = $modx->getCollection('modResource');
       
      foreach ($resources as $resource) {
          $resource->joinGroup('allDocs'); /* or whatever Resource Group you want */
          $resource->save();  /* don't think this is actually necessary */
      }


      oops, forgot to answer the question. But I don't think it's necessary. Just run the saved snippet in the content area of the utility page you created. The full edit snippet content area has a php header, but you've got to return and paste on line 2, and then delete the extra header. If you use quick edit, the php header doesn't show up after saving but you won't have to mess with that first line wonkiness. [ed. note: frogabog last edited this post 13 years, 11 months ago.]
        Frogabog- MODX Websites in Portland Oregon
        "Do yourself a favor and get a copy of "MODX - The Official Guide" by Bob Ray. Read it.
        Having server issues? These guys have MODX Hosting perfected - SkyToaster
        • 40088
        • 708 Posts
        Ok, I got it working for allDocs. But here's my dumb question:

        I have 3 Resource Groups:

        Admin
        allDocs
        Editor

        If I want to add all Resources to both the Admin and Editor groups do I need to change the snippet to match each one? So I would change 'allDocs' to 'Admin' and run it. Then change the snippet again to 'Editor' and run it once more. Is that what needs to happen for each Resource Group?

        Thanks
          Todd
          • 10208 ☆ A M B ☆
          • 1,780 Posts
          yes
            Frogabog- MODX Websites in Portland Oregon
            "Do yourself a favor and get a copy of "MODX - The Official Guide" by Bob Ray. Read it.
            Having server issues? These guys have MODX Hosting perfected - SkyToaster
            • 10208 ☆ A M B ☆
            • 1,780 Posts
            You probably could use a comma delineated line too, but it's only two more runs.

            Do you have the defaultResourceGroup plugin configured yet? You'll want to do that if you want all new resources in these groups forever more.
              Frogabog- MODX Websites in Portland Oregon
              "Do yourself a favor and get a copy of "MODX - The Official Guide" by Bob Ray. Read it.
              Having server issues? These guys have MODX Hosting perfected - SkyToaster
              • 40088
              • 708 Posts
              Thanks for your help, Frogabog, much appreciated.

              And thank you Bob, this has saved me hours of work, e.g., dragging 300+ pages to 2 different Resource Groups.
                Todd
                • 10208 ☆ A M B ☆
                • 1,780 Posts
                You're Welcome :~}

                This stuff kicks my azz too. Bob saves me a lot.

                You've got his book, right? I really had to combine all three, the book, his tutorials, and the documentation to get the limited understanding of ACL's that I've got right now. It's not much, I've only got one site working just as I want it so far and that's just the basics. Much more to do.
                  Frogabog- MODX Websites in Portland Oregon
                  "Do yourself a favor and get a copy of "MODX - The Official Guide" by Bob Ray. Read it.
                  Having server issues? These guys have MODX Hosting perfected - SkyToaster
                  • 40088
                  • 708 Posts
                  Quote from: frogabog at Oct 13, 2012, 02:41 PM
                  You're Welcome :~}

                  This stuff kicks my azz too. Bob saves me a lot.

                  You've got his book, right?

                  I don't yet have Bob's book. ACLs are definitely a beast. For all the positive things about Revo ACLs knock it down several notches for me in terms of user-friendliness. It kind of makes me wonder, "What the hell were the devs thinking?" Sheesh. It's very slowly starting to make sense but it will be a long time before I feel confident about setting them up. And I get the feeling I'm not alone.
                    Todd
                    • 3749
                    • 24,544 Posts
                    Maybe the video of my presentation at MODXpo will help. wink

                    I think one problem a lot of people have with MODX permissions is thinking they're more complicated than they really are. I know that was true for me for the longest time. Another big problem is the carryover for former Evolution users, especially with respect to Roles. That bit me too.

                    My best first bit of advice to people trying to figure out Revo permissions is to forget about Roles altogether. Having a bunch of Roles is confusing and usually unnecessary unless you're doing, say, a University or corporate web site. In Revolution, you can almost always do what you want with just two Roles: Admin Super User (for you only) and one other role.

                    The only reason to have more Roles is if you want users in the same User Group to have different permissions (i.e., different Policies apply to them). As long as you put users with different rights in different User Groups, and all the users in a given User Group have the same powers, roles are irrelevant.


                    ------------------------------------------------------------------------------------------
                    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
                      • 40088
                      • 708 Posts
                      Having followed this tut to the letter http://rtfm.modx.com/x/TwIdAQ I assigned a new user with an Admin role but with limited admin permissions. The new user can edit/add/delete content/Resources just fine based on the limited permissions I gave them.

                      Here's where it gets weird:

                      There are now 2 users: Admin Full and Admin Lite.

                      When I'm signed-in as Admin Full and I assign a Resource to a Resource Group (of which there is only one: 'Admin') that particular Resource goes missing for Admin Lite. In other words, if I as Admin Full were to assign every page to the 'Admin' Resource Group then the resource tree for Admin Lite would be completely blank except for the 'web' folder. It's a bit shocking. Also, if, as Admin Lite, I try to assign a Resource to the 'Admin' Resource Group it throws an alert: "Can't find Resource id(some number)"

                      As it stands, none of my pages/Resources are assigned to a Resource Group and things work but I'm hoping this problem is nothing more than a simple permission setting. I could really use your help with this.

                      Thanks
                        Todd