This mod allows admins to switch to permissions of another user on the forum. In order to switch permissions, you need to click the switch permissions button on members' profile summary.
So I got around to porting one of my favorite mods. I guess I could have used some of the hooks there but since I had to edit some files, I didn't bother. Let me know if there are any issues.
http://addons.elkarte.net/admin/Switch-Permissions.html
Works great :) Thanks for porting it to ElkArte.
/me likes!
/me wonders if it could go into 1.1 at some point... O:-)
This is very cool .. how did I not know about this one, so useful!
Please explain... Is this mod to check if you - as admin - have set the permissions of another group right without the need to logout and login with a test user? You can switch your group, check the permissions, and switch back to admin group?
That would be great actually. Feel free to use the code as you wish in case you decide to add such a feature.
The idea is from another forum I'm the admin of. It's very handy when dealing with permissions.
Yeah, it's pretty much as you've described. Without logging out, you assume the groups of a selected member. I have added two screenshots to the first post to make it a little more clear.
Great feature. Thanks
@[SiNaN]
very nice mod and useful for testing permissions. No more test accounts ;)
I tried this addon and I found a bug, or at least I think so ;)
I have a board with custom permissions. Only on that board people can edit their post. I did a test with a normal account and I can confirm that permissions are ok so people can edit their posts. When I switch permission to a user I can't see the Edit button. Is this normal?
@[SiNaN], I was just looking at this mod and I noticed that it could definitely use hooks.
In Load.php, "integrate_user_info" but you have to duplicate some efforts. I think we should break down the loading of the groups in to a separate function and then add a hook in there for that. Then switch_membergroups() should use a separate file (where you can also put the hook callbacks and action switchpermissions())
SiteDispatcher is an easy one. integrate_actions
Instead of editing Addons.english.php, just load your own language file.
I don't see any way to get around the Security.php edits.
Also, please test it properly, it has some non-reported bugs that I discovered that drove me really mad as it leaded me to think I had screwed the permissions but it was the mod being at fault. The issue if I remember correctly is that it was giving me access to the mod center despite not being a mod (but a former one, on my test account). Don't ask me for steps to reproduce now, because I've done a looooot of mess with it, just test it though, please.
Not sure if they are related to other mods being in conflict with it, probably, but not sure why nor which ones, if so.