We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 43864
    • 151 Posts
    I have made a site where visitors can make a profile-page. These users are then stored into a usergroup.

    My client, with profile 'editor', can watch and edit users in the manager. So far so good.

    The problem is dat my client now has a view of ALL users, so he can also manage other editors and even the admin-account.

    1) How can I disable so he only can see (and edit) the users from a certain usergroup.
    2) How can I restrict certain fields out of the users-menu. F.e.: the tab with the access-rights.

    Thx for help. User permissions is not a peace of cake in Modx.
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      Easy answer. You can't. User access is all or nothing.

      More complicated answer. You could create a plugin to prevent a given user, or all members of a given group, from editing other given users, or users belonging to a given group.

      To add to the complexity, you could create custom permissions in a Policy Template, use that Policy Template as the basis for a Policy to use for your Administrator group, and then use those permissions in your plugin to determine if the current user can edit certain users.
        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
        • 43864
        • 151 Posts
        @Sottwell: thx for you answer. I'm not so familiar with creating plugins.

        Maybe another way (I'm just thinking): maybe it's possible to show a usergroup through a Migx?
          • 4172
          • 5,888 Posts
          Its possible to create a CMP with help of MIGXdb, where the editor can only add/edit users within a given group/groups

          some example-code for another use-case/scenario:

          https://github.com/Bruno17/migxclientmanager
            -------------------------------

            you can buy me a beer, if you like MIGX

            http://webcmsolutions.de/migx.html

            Thanks!