Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2011-06-28 08:58:16
- M_i
- Member
- Registered: 2006-03-05
- Posts: 122
How do I limit the privileges of new users to creator's privs or less?
Hello,
I’m building a site for a client, and I want to give them limited privileges because I don’t want them interfering with the structure of the site. Now it’s quite straightforward to assign exactly the privileges I want them to have — with one snag: as soon as I let them create more users (which I need them to be able to do), they can also create users with Publisher privileges, even though that is a role I wanted to reserve for myself.
Basically, I want to give the Managing Editor the right to create new users, but only users with Managing Editor privileges or lower, and not Publisher privs. How do I accomplish that?
Many thanks in advance!
- iris
Edit: What I’ve done now is simply comment out the publishers privs from the txp_groups array at the end of admin_config.php. Not very elegant, but it seems to do what I need. Better solutions of course still very welcome!
Last edited by M_i (2011-06-28 10:15:13)
Offline
Re: How do I limit the privileges of new users to creator's privs or less?
Well, the admin_config.php is one way, but you could also try bot_privs
Offline
Re: How do I limit the privileges of new users to creator's privs or less?
I too initially thought bot_privs might do it, but I don’t think it’ll let you alter the available roles to the current-user-level and below (I may be wrong).
I have a plugin that is approaching readiness to allow complete user/group management, but even that will only allow half of what M_i wants (assigning custom privs to an area). I’m trying to think of a way to do it: I don’t think even a plugin can do this without some horrible search and replace, or javascript trickery. Hmmmmm. I might build this request into the plugin if you can wait a day or two.
Last edited by Bloke (2011-06-28 10:52:06)
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
#4 2011-06-28 10:50:52
- M_i
- Member
- Registered: 2006-03-05
- Posts: 122
Re: How do I limit the privileges of new users to creator's privs or less?
lazyadmin wrote:
Well, the admin_config.php is one way, but you could also try bot_privs
I’m already using bot_privs to control privileges. Very handy. But not relevant to my issue here.
The issue is that I do want the managing editor to be able to create new users,
but I don’t want the managing editor to create new publishers.
Bot_privs and all other ways of controlling privileges (ie, the old-fashioned way by editing admin_config) only give the choice whether or not to allow a group of users to edit users. Once you allow a group of users to admin.edit, they can create new users with higher privileges than their own, and that’s the bit I’m trying to change.
Hope that’s more clear now.
Offline
#5 2011-06-28 11:10:17
- M_i
- Member
- Registered: 2006-03-05
- Posts: 122
Re: How do I limit the privileges of new users to creator's privs or less?
Bloke wrote:
I too initially thought bot_privs might do it, but I don’t think it’ll let you alter the available roles to the current-user-level and below (I may be wrong).
You’re not. Wrong, that is ;)
Bloke wrote:
I have a plugin that is approaching readiness to allow complete user/group management, but even that will only allow half of what M_i wants (assigning custom privs to an area). I’m trying to think of a way to do it: I don’t think even a plugin can do this without some horrible search and replace, or javascript trickery. Hmmmmm. I might build this request into the plugin if you can wait a day or two.
That’d be great! Most CMS limit user creation to current level and below, it seems a very obvious thing. What’s the point in limiting privileges if that user can go and create a new user that will give him free rein?
The way I ‘fixed’ it now only hides the publisher group from the admin page. This is just fine for my purpose, because I’ll never need to create another publisher. But I can imagine many other people would benefit from this option, especially those with pesky clients who’d only mess things up…
Offline
Re: How do I limit the privileges of new users to creator's privs or less?
M_i wrote:
Most CMS limit user creation to current level and below, it seems a very obvious thing.
Yeah. TXP gets round it by (traditionally) only allowing Publishers to create users! This plugin breaks this tradition so you’re right, I should build that in. Thanks for the timely nudge :-)
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline