We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 42802
    • 96 Posts
    Sebastian Zahn | ingroove.uy Reply #1, 10 years, 7 months ago
    Hi! I've this situation: I´m working in a website for a designer friend, and i want the clients be able to create users ( site admins ), so i create a usergroup, create my own Policy Template, and assigned it to the created usergroup. Create a user in this usergroup. In that custom policy i give them permissions to create, edit users, but when i log in ( in other browser ) with the new user, i noticed that i can EDIT the main admin account. I uncheck the "edit user" permission for the custom policy template, clear cache, flush all sessions, and when i log in with the cliente user, i can´t see the content of the Security Tab. I read one by one all the 172 permissions.

    So, this is what i need to do: I want the client to be able to insert and edit users ( people that will admin the content of the website ), but can´t edit my super admin account, so if there is some trouble in the future, i cant login and fix it. Thanks!
    P.D. I tried roles too...

    This question has been answered by BobRay. See the first response.

    [ed. note: zzseba last edited this post 10 years, 7 months ago.]
    • discuss.answer
      • 3749
      • 24,544 Posts
      Unfortunately, MODX user permissions are not that granular, though they probably will be in an upcoming version. Either the user can edit users or they can't. There's no easy way to control which users they edit.

      You might be able to create a plugin connected to OnBeforeUserForm save that checked who the current user was and aborted the save (or forwarded them to the unauthorized page) if they weren't authorized to save that user or to save a user in the Administrator user group. You'd also have to make sure they couldn't create new sudo users in the group they have access to.
        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
        • 42802
        • 96 Posts
        Sebastian Zahn | ingroove.uy Reply #3, 10 years, 7 months ago
        Thanks for the reply!
        I think i just let the edit permission and tell the customer that don´t change my account. It´s the first real project using Modx Revo and it´s fantastic, really enjoy the process. It´s a responsive website from a insurance company.
        Thank´s Bob, i´ll get your Book soon smiley
        Right now i´m tweaking the login page look, i attached a printscreen.:)

        Cheers from Uruguay, Sebastián.
          • 3749
          • 24,544 Posts
          Looks good. Welcome to MODX. smiley
            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