ElkArte Community

Project Support => General ElkArte discussions => Topic started by: oblivion on February 21, 2016, 10:13:00 pm

Title: Question about Moderator permissions
Post by: oblivion on February 21, 2016, 10:13:00 pm
Is it possible to configure moderator permissions such that they can't see IP addresses on posts in the forums they moderate?
Title: Re: Question about Moderator permissions
Post by: oblivion on February 22, 2016, 01:51:58 am
Quote from: oblivion – Is it possible to configure moderator permissions such that they can't see IP addresses on posts in the forums they moderate?

Antechinus helped me out with this, many thanks!
Title: Re: Question about Moderator permissions
Post by: Antechinus on February 22, 2016, 02:06:56 am
Meaning I showed her the relevant template hack, not relevant admin config. If anyone else wants it:

Code: (GenericMessages.template.php - Line 175) [Select]
	// Show the IP to this user for this post - because you can moderate?
if (!empty($context['can_moderate_forum']) && !empty($message['member']['ip']))
$poster_div .= '
<li class="listlevel2 poster_ip">

Code: (Change to:) [Select]
	// Show the IP to this user for this post - because you is teh admin and not a mere moderator?
if ($context['user']['is_admin'] && !empty($message['member']['ip']))
$poster_div .= '
<li class="listlevel2 poster_ip">

Which could obviously be done as a legit mod package if anyone wanted to.
Title: Re: Question about Moderator permissions
Post by: oblivion on February 22, 2016, 03:10:44 am
thanks again!
Title: Re: Question about Moderator permissions
Post by: emanuele on February 22, 2016, 03:54:02 am
hmm... moderate "forum" is much more than just moderate a "board", from the help text:
QuoteThis permission includes all important member moderation functions:
access to registration management
access to the view/delete members screen
extensive profile info, including track IP/user and (hidden) online status
activate accounts
get approval notifications and approve accounts
immune to ignore PM
* several small things
that's why who has "moderate forum" permission can see IP, they need to.
Title: Re: Question about Moderator permissions
Post by: Antechinus on February 22, 2016, 03:58:23 am
Wasn't "moderate forum" originally just the same as global moderator?
Title: Re: Question about Moderator permissions
Post by: emanuele on February 22, 2016, 04:00:42 am
Nope, never been.
Moderate forum has always included such things.
Title: Re: Question about Moderator permissions
Post by: Antechinus on February 22, 2016, 04:08:08 am
Ok. Well using is_admin does restrict it to the actual admin group, which is what she was after. So good enough AFAICT, unless you can think of something better.

ETA: And silly names inherited from YabBB. ::)
Title: Re: Question about Moderator permissions
Post by: emanuele on February 22, 2016, 04:21:50 am
I was more leaning toward the question: are you sure the members need to have "moderate forum" permission? Or maybe they may just be happy belonging to the global mod group?

Re: naming: indeed. xD
Title: Re: Question about Moderator permissions
Post by: Antechinus on February 22, 2016, 04:27:13 am
Ok. Are you saying that in Elk, Global Mod doesn't allow viewing IP's in posts anyway? Because from back when I ran an SMF site, the global mods could see IP's in posts.

ETA: Hmm. I should test that on SMF on local. My memory may be playing tricks on me.
Title: Re: Question about Moderator permissions
Post by: emanuele on February 22, 2016, 05:17:35 am
From what I can see, no. The "Moderate forum members" (name of moderate_forum) permission is not on by default (it's not in the install code so it should not be on).
Title: Re: Question about Moderator permissions
Post by: Antechinus on February 22, 2016, 05:39:22 am
Y'know a good buglet fix would be to call it something else.
Title: Re: Question about Moderator permissions
Post by: Antechinus on February 22, 2016, 05:43:32 am
Ah. I know what happened. Global mods could see IP's back on the SMF site, because when we were setting up the site we looked at the permissions page and checked "Moderate forum members" because hey, they were global mods so of course we wanted them to be able to moderate members. Not much point making them mods if they can't do any modding. :P
Title: Re: Question about Moderator permissions
Post by: Antechinus on February 22, 2016, 05:46:06 am
So I betcha Oblivion did the same thing for the same reason, and then found that global mods could see IP's.

(IOW, the naming is stoopid)
Title: Re: Question about Moderator permissions
Post by: oblivion on February 22, 2016, 06:28:30 pm
Quote from: Antechinus – Ok. Well using is_admin does restrict it to the actual admin group, which is what she was after. So good enough AFAICT, unless you can think of something better.

ETA: And silly names inherited from YabBB. ::)

What I was after was to prevent Board Mods (I think that's the ElkArte terminology for a moderator who is assigned to specific subforums) from seeing IP addresses.  Right now, I don't have any global moderators.  At some point I may need to add mods at that level.  So this fix did solve my immediate problem.

If I wanted to give global mods the ability to see IP addresses what would the correct label be?
Title: Re: Question about Moderator permissions
Post by: emanuele on February 23, 2016, 03:18:20 am
As far as I can tell, local/board moderators do not see IPs by default. The only IP they can see it should be their own (like anyone else I think, I'm not entirely sure at the moment).
If you changed their permissions that's another matter, in which case the solution is identify the correct permission to remove.

Why am I insisting on the point?
Because in Elk philosophy, if you see an IP it means you have permissions to do something with that IP like ban, deal with members (register/approve/delete), etc. that anyway are not "board" permissions. ;)

If it is not that, then it may very well be a bug, and it would be nice to debug it together. :)
Title: Re: Question about Moderator permissions
Post by: Antechinus on February 23, 2016, 04:01:07 am
I think what happened here is the same thing that happened back when myself and others were setting up SMF permissions. If someone who doesn't know different is setting up permissions for moderators, and they see a permission titled "Moderate forum members", they will naturally check it because they are setting up moderators and they want their moderators to be able to, in the literal sense, not in the WTF YaBB sense, moderate forum members.

If the permission is not related to standard moderation functions, then it would make more sense to give it a title that reflects what it does. Something like "Administrate member accounts", for example. If it said that instead, nobody would check it if they just wanted normal moderators.

Short version: is bug, but not in code. Is bug in text string. Which is easy to fix. ;)