Advertisement:

Author Topic: SwitchPermissions  (Read 12411 times)

Online GL700Wing

  • Jr. Member
  • **
  • Posts: 187
  • Gender: Female
Re: SwitchPermissions
« Reply #20 on: July 14, 2013, 07:38:14 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.



Offline phantomm

  • Sophist Member
  • *****
  • Posts: 1,059
  • Gender: Male
    • pages/smfpl/171860759503032 on Facebook
    • Polish ElkArte community
Re: SwitchPermissions
« Reply #21 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?
Polskie wsparcie SMF na simplemachines.org

My mods

Offline brynn

  • Jr. Member
  • **
  • Posts: 280
  • Gender: Female
    • Inkscape Community
Re: SwitchPermissions
« Reply #22 on: July 14, 2013, 08:44:37 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  :)

Offline Stylus

  • SMF Hero
  • ******
  • Posts: 3,024
    • Free Homework Help
Re: SwitchPermissions
« Reply #23 on: July 14, 2013, 10:27:17 AM »
While I find this modification very limitedin what it can do, it is such a cool idea lol What made you think of this?
« Last Edit: July 14, 2013, 12:30:32 PM by Liam_michael »

Offline brynn

  • Jr. Member
  • **
  • Posts: 280
  • Gender: Female
    • Inkscape Community
Re: SwitchPermissions
« Reply #24 on: July 14, 2013, 10:34:56 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?

Offline Stylus

  • SMF Hero
  • ******
  • Posts: 3,024
    • Free Homework Help
Re: SwitchPermissions
« Reply #25 on: July 14, 2013, 12:29:53 PM »
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.

Offline ThisForumIsDead

  • Full Member
  • ***
  • Posts: 477
  • Gender: Male
Re: SwitchPermissions
« Reply #26 on: October 22, 2014, 10:17:18 AM »
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.


Offline aizek123

  • Semi-Newbie
  • *
  • Posts: 10
Re: SwitchPermissions
« Reply #27 on: August 19, 2016, 07:48:14 AM »
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

Offline Shambles

  • SMF Hero
  • ******
  • Posts: 4,217
  • Gender: Male
    • i30 Owners Club
Re: SwitchPermissions
« Reply #28 on: August 19, 2016, 08:20:39 AM »
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?

Offline aizek123

  • Semi-Newbie
  • *
  • Posts: 10
Re: SwitchPermissions
« Reply #29 on: August 19, 2016, 08:34:39 AM »
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
« Last Edit: August 19, 2016, 08:45:42 AM by aizek123 »

Offline Shambles

  • SMF Hero
  • ******
  • Posts: 4,217
  • Gender: Male
    • i30 Owners Club
Re: SwitchPermissions
« Reply #30 on: August 19, 2016, 08:42:25 AM »
It doesn't confer any extra privileges - at best it reduces them.

Offline aizek123

  • Semi-Newbie
  • *
  • Posts: 10
Re: SwitchPermissions
« Reply #31 on: August 19, 2016, 08:47:17 AM »
Now it is clear

Offline Linkjay

  • Jr. Member
  • **
  • Posts: 205
  • Gender: Male
  • eh
    • My Homepage.
Re: SwitchPermissions
« Reply #32 on: April 27, 2017, 05:36:21 PM »
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:

Code: [Select]
'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