Skip to main content
Topic: [ADDON] Switch Permissions (Read 5542 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

[ADDON] Switch Permissions

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

Re: [ADDON] Switch Permissions

Reply #1

Works great :) Thanks for porting it to ElkArte.

Re: [ADDON] Switch Permissions

Reply #2

 emanuele likes!

 emanuele wonders if it could go into 1.1 at some point... O:-)
Bugs creator.
Features destroyer.
Template killer.

Re: [ADDON] Switch Permissions

Reply #3

This is very cool .. how did I not know about this one, so useful!

Re: [ADDON] Switch Permissions

Reply #4

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?

 

Re: [ADDON] Switch Permissions

Reply #5

Quote from: emanuele –
 emanuele wonders if it could go into 1.1 at some point... O:-)

That would be great actually. Feel free to use the code as you wish in case you decide to add such a feature.

Quote from: Spuds – This is very cool .. how did I not know about this one, so useful!

The idea is from another forum I'm the admin of. It's very handy when dealing with permissions.

Quote from: Jorin – 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?

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.

Re: [ADDON] Switch Permissions

Reply #6

Great feature. Thanks @[SiNaN]

Re: [ADDON] Switch Permissions

Reply #7

very nice mod and useful for testing permissions. No more test accounts ;)
sorry for my bad english

Re: [ADDON] Switch Permissions

Reply #8

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?
sorry for my bad english

Re: [ADDON] Switch Permissions

Reply #9

@[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.

Re: [ADDON] Switch Permissions

Reply #10

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.
~ SimplePortal Support Team ~