3

I need my client (typical editor account in CMS) to be able to add/modify/delete users in the CP. I don't want him to have access to groups/permissions for users, but I need to put every user he creates into the same group (Site Users).

The existing plugin - https://github.com/lindseydiloreto/craft-autoassignusergroup - doesn't work if the client doesn't have the "Assign user groups and permissions" checked.

Is there a way to force every new user created in the CP by the client into a default group? Or a way to give him "Assign user groups" but not "and permissions"?

1
  • 1
    There's also the Sanction plugin which hides the "permissions" part for selected user groups. github.com/joshuabaker/craft-sanction . This is close to what I need, but the client can still assign new users to any group. Commented Jul 17, 2015 at 15:58

1 Answer 1

2

doesn't work if the client doesn't have the "Assign user groups and permissions" checked.

That's not a limitation of the plugin, but a requirement of Craft.

Is there a way to force every new user created in the CP by the client into a default group?

Yes, that's what the previously linked plugin will do, with the caveat that the currently logged in user has to have assignUserPermissions permissions.

The only way I can think of to do what you're trying to accomplish is build the user administration stuff for your client on the front-end of the site. That way - though a plugin - you've got complete control over the user management business logic.

3
  • Thanks Brad. A small sub-question - can I hide the "Permissions" tab trough code? So the user would still have permissions, but he wouldn't see it in CP. I'd have to do this only for one user with known $userId. Commented Jul 18, 2015 at 9:31
  • 2
    I think you'd need to use something like this: github.com/lindseydiloreto/craft-cpcss
    – Brad Bell
    Commented Jul 18, 2015 at 16:41
  • Great, haven't noticed that plugin before. Thanks a lot! Commented Jul 19, 2015 at 7:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.