News:

SMF 2.1.1 has been released! Take it for a spin! Read more.

Main Menu

SwitchPermissions

Started by [SiNaN], August 20, 2010, 03:30:15 AM

Previous topic - Next topic

GL700Wing

Quote from: brynn on July 13, 2013, 10:25:04 AM
I can't find "Switch Permission" anywhere.
I've just installed this mod for the first time and it took me a little while to work out how to use it.

Basically what you have to do is view the profile of another user (eg, a user with standard privileges, a moderator, etc) on your forum - that's when/where you'll see the 'Switch Permissions' option.  Once you switch to that user's profile you'll then see the option in a message bar to revert to your own profile.


Life doesn't have to be perfect to be wonderful ...

Adrek

You know that it will not be visible on your own profile page but only on other profiles?
Polskie wsparcie SMF na simplemachines.org

the simplest solution is most likely the right one

brynn

Quote from: phantomm on July 14, 2013, 07:40:13 AM
You know that it will not be visible on your own profile page but only on other profiles?
Oh, you mean I choose whose profile I want to switch to first, and then click Switch Permission?

Oh ok, yes, there it is!  I thought I would click Switch, and then choose which permissions I wanted.

Ok then, problem solved -- yay!

Thank you all very much  :)
Inkscape Community  (SMF with Tiny Portal)

Inkscape for Cutting Design  (originally a phpBB forum, converted to SMF, and using Simple Portal)

Biology Forums

#23
While I find this modification very limitedin what it can do, it is such a cool idea lol What made you think of this?

brynn

Quote from: Liam_michael on July 14, 2013, 10:27:17 AM
While I find this modification very limited in what it can do, it is such a cool idea lol What made you think of this?

Are you kidding?  Of course, I didn't make it.  But I would have, if I had that kind of knowledge.  Don't you often have to log out from your admin account, and log into a regular user account, to see how your forum looks or functions for regular members?
Inkscape Community  (SMF with Tiny Portal)

Inkscape for Cutting Design  (originally a phpBB forum, converted to SMF, and using Simple Portal)

Biology Forums

Quote from: brynn on July 14, 2013, 10:34:56 AM
Quote from: Liam_michael on July 14, 2013, 10:27:17 AM
While I find this modification very limited in what it can do, it is such a cool idea lol What made you think of this?

Are you kidding?  Of course, I didn't make it.  But I would have, if I had that kind of knowledge.  Don't you often have to log out from your admin account, and log into a regular user account, to see how your forum looks or functions for regular members?

Yeah, that's what I admire about it. But to defend what I meant, it's a small change, but an effective one. Sorry if anyone misunderstood.

OCJ

I have a slight problem with this mod... great for testing the site though.


When you switch permissions from the users profile, you cannot view their profile again. It just gives an error message and says you are not allowed to view it.

Quote
An Error Has Occurred!
You are not allowed to access this section

Perhaps their are conflicts distinguishing between admin and switched user accessing profile page but I needed to check newly registered users had access to just the things they need.
I can do it logging in similar accounts but this way using the mod is best.


aizek123

Hi, folks

The switch permissions mod installed on my forum to allow admins to switch to permissions of another user on the forum. How can enable this feature for my forum moderators? I also want them to be eligible to use the switch permissions. I couldn't find how to enable it in admin panel

many thanks

Shambles

It's for admins only, mostly useful to test the permission capabilities of less privileged groups.

Why on earth would you want your moderators to be able to do that? Do you understand what the mod actually achieves?

aizek123

#29
Mr. Shambles who advised me to upload the flag gifs to the mod's /images/flags/ folder and rename them as .png. in ,, New flag installation,,. Sorry but I couldn't your method with renaming gifgs to ,png to work
For sure I understand but just asked if it is possible to do it for the moderator group too

Shambles

It doesn't confer any extra privileges - at best it reduces them.

aizek123


Linkjay

Very nice mod. Only issue I had is it does not have Ultimate Profile support out of the box. To fix this, you can do the following. OP, if you maybe want to drop an update on the mod including this? I tested this on SMF 2.0.13 and it works just fine.

First step is to install it normally with the package manager.

Then apply this code sample in the following place:

In Sources/Profile.php

Look for the "profile_action" array. This array contains all the possible things that can be under the "Action" button in any profile.

Add after the "comment" array:


'switchperms' => array(
'label' => $txt['switch_permissions_button'],
'custom_url' => $scripturl . '?action=switchpermissions;u=' . $context['id_member'] . ';' . $context['session_var'] . '='. $context['session_id'],
'enabled' => !$context['user']['is_owner'] || $context['user']['is_admin'],
'permission' => array(
'own' => 'profile_view_own',
'any' => 'profile_view_any',
),
),


Should look mostly like this (Full size image):


This mod does not add any extra permissions and will only work if you are in the root administrator group (the group that is given all permissions automatically).

The "Switch Permissions" button will now be found under the "Actions" button in any profile:
I play games in my free time and volunteer my knowledge and support to the gaming communities of the internet.

You can contact me by these methods:
Use my Contact Script • PM me here • Add me on Steam

Steve

This seriously needs to be upgraded to work with 2.1.1 ... it's one of the most useful mods I had.
Please do not PM me for support.

Arantor

Quote from: Steve on April 01, 2022, 05:50:27 PMThis seriously needs to be upgraded to work with 2.1.1 ... it's one of the most useful mods I had.

That tells me the user profile area that shows permissions does a bad job and should be improved.
No good deed goes unpunished / All helpful urges should be circumvented

I have something to say: it's better to burn out than to fade away. There can be only one.

Steve

It's nice to click on a member's name, click 'switch permissions' and see the forum as they see it. Then it's one click to go back to your own permissions.
Please do not PM me for support.

Arantor

See, that's the thing, I've literally never found the need to do that - because the page in the user's profile to indicate what they can/can't do was always enough for me...
No good deed goes unpunished / All helpful urges should be circumvented

I have something to say: it's better to burn out than to fade away. There can be only one.

Advertisement: