We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 35756
    • 166 Posts
    profilneurotiker Reply #1, 12 years ago
    Hi there!

    I'm using MODx 2.2.15 in a project, where I created an editor-user who has restricted access in the mgr-context.

    The Editor-user has to be able to access the Security - Manage Users-area to activate/deactivate users that have registerred to the site. This is working fine for me atm...

    But the Editor-user is also able to edit the admin-profile, even to deactivate and delete it.

    How can I prevent the admin-profile from being edited by any other user than the admin himself?
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      Unfortunately MODX doesn't provide any granularity in user management permissions.

      You'll need a plugin probably using OnUserFormPrerender (before the user editing form is generated), that checks the current user and the user he's trying to edit.
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 35756
        • 166 Posts
        profilneurotiker Reply #3, 12 years ago
        Hello susan!

        And thanks a lot for your answer!

        I thought this might be usual, but I'm gonna have a deeper look about the mentioned way by using a plugin.
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          It would probably be easier to use groups than actual individual users, if the current user is a member of group Editors then he is denied access to the editing form for members of group Administrator. Or if the current user is NOT a member of group Administrator then he cannot edit a member of group Administrator. Something like that.
            Studying MODX in the desert - http://sottwell.com
            Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
            Join the Slack Community - http://modx.org
            • 35756
            • 166 Posts
            profilneurotiker Reply #5, 12 years ago
            This sounds comprehensible and promisable smiley

            Need to sort out a few other issues first, but I'm gonna get back on here when I find the solution!

            Thank you again for pointing me to the direction!