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.
-
☆ 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.
@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?
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