We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 17665
    • 54 Posts
    Not sure if this would fall under "Core" or tips and tricks... but I wanted to give something back to this community that I have taken so much from lately. You guys are awesome.

    We’re working on a site that has a worldwide directory of churches and campus ministries. We want to be able to allow each church/campus to update their own page as well as create regional managers who can update specific countries or continents. I wrote some php code to import the data and create the needed pages and permissions groups only to find out we had way too many! The group permissions page was crashing IE and took forever to load and when you edit a page you’d get a huge list of document permission groups which would also slow things down.

    Attached is a word doc describing the hacks we made to the core to control this a bit. It’s definitely specific to what we’re doing and may not be helpful to anyone, but I thought I’d share it none the less. In a nutshell, I created a filter for displaying only a subset of the permissions available (example: NorthAmerica). It also sorts the permissions by name. For this to work, you have to hold to a specific naming convention for your permissions groups (example: NorthAmerica:UnitedStates:California:mychurch), but we’re going to get around that by creating our own tools for adding a new church entry/user/user group all at once automatically. Also, it only shows document groups that the current document being edited is part of. You can check a box to reload the page and show all document groups if you need to add them to something else.

    Hopefully this will be useful to someone who is trying to manage a lot of users and group permissions using modx. If enough people need this, maybe I can figure out how to do it correctly as a plugin.

    The more I use MODx, the more stoked I am about it. Hopefully with time I’ll learn more about this great system and be able to contribute more.


    Files modified:

    /manager/actions/dynamic/access_permissions.dynamic.action.php
    /manager/actions/dynamic/mutate_user.dynamic.action.php
    /manager/actions/dynamic/mutate_content.dynamic.action.php
    • Thanks Luke!

      Very helpful indeed as we consider our options for making the user system more robust and more simple at the same time. smiley
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 1764
        • 680 Posts
        Let me just say that the ordered permissions lists will definitely make it into the next release. I’ll make sure of it. I’ve been hacking that ever since Etomite smiley
          • 32241
          • 1,495 Posts
          Quote from: aNoble at Jan 31, 2006, 03:43 AM

          Let me just say that the ordered permissions lists will definitely make it into the next release. I’ll make sure of it. I’ve been hacking that ever since Etomite smiley

          That’s cool, I’ve been wanting this solution. Right now I’m building my own front-end web user management interface from a scratch. Hope this will be able to ease my job for the future release.

          Thanks Adam
            Wendy Novianto
            [font=Verdana]PT DJAMOER Technology Media
            [font=Verdana]Xituz Media