Registration access without full 'member moderation'.

Started by smokester, November 07, 2009, 09:37:31 AM

Previous topic - Next topic

smokester

Admin/Members/View all members.

IPs still show in the 'IP address' column.

Arantor

I was hoping you were going to confirm the URL actually; easier for me to track down that way.

smokester

Not sure what to have posted then.. maybe:

*/index.php?action=admin;area=viewmembers;*

It's obviously called from the 'ManageMembers.php' and should your edits override the IP view from that?  I have tried this a few times to see if it something I am doing but it seems pretty consistent.

Surely it's time I get my coat? :)

Arantor

As you can see the edits never touched ManageMembers.php but knowing the URL means I was able to find where the code calls.

Unfortunately this one is a little bit nastier to figure out because the entire page is essentially setup to just call createList (which is a mighty, undocumented function)

* Arantor tries to figure out how this one needs to be done.

smokester

Quote from: Arantor on November 30, 2009, 09:09:47 AM

* Arantor tries to figure out how this one needs to be done.

Well I have my coat in hand but I'll sit here a while and see how it pans out then.

smokester

Is this going to be a toughie then?  Would it be possible or easier just to separate out the "access to registration management" from the moderare members permission?

I actually prefer it the way you have done it by isolating the IP view entirely (well, almost), and if this latest probem could be fixed it would be absolutely ideal.

Thanks.

Arantor

Well, I'm still trying to figure out how to handle the createList - it's a mammoth piece of coding and I want to get it right. What I'm thinking is, drop the IP column entirely unless you have view all IP rights, seems to be the cleanest solution.

smokester


Arantor

No worries - about time I figured out how to work with createList anyway...

Arantor

Right, I *think* this one should do it.

This one locks out the column from the view members area if you don't have view_ip_address_any, and also locks the field from being entered on the template (and even if you do enter it, e.g. through Firebug, it won't do anything, the entry is removed prior to a search being executed, so the search will ignore it entirely, if you're not privileged)

I think I'll re-list it on the mod site with this entry :)

smokester

Wow, thanks Arantor.  I'll install it fortwith although I did install the other one in my main board that I may have to uninstall manually. 

I'm positive we're good to go now so thanks for all you help and effort.

Arantor

Let me know if it doesn't work out - I did submit this one as a mod to the mod site last night, so it can be publicly visible there too once it's approved.

smokester

I got kinda bad news..

The link works fine and to I wasn't sure if you had modified any of the previous code so I installed a new forum from scratch and set this up.  Unfortunately, when a global mod clicks on his "members" section in his admin, I get this error:

QuoteTemplate Parse Error!
It seems something has gone sour on the forum with the template system. This problem should only be temporary, so please come back later and try again. If you continue to see this message, please contact the administrator.

I had "moderate members" permission on and "view all ips" off in that dummy profile, so I tried it with the "view all ips" on and I got the same error?  Does this not replicate for you?  I am using v2 RC1.2 in case you set it up for RC2 and that is my issue.

Damn! You really should tell me to get my coat now Arantor.

Arantor

*headdesk*

I fixed this last night - I just forgot to update the .zip file before uploading.

Themes/default/ManageMembers.template.php
Code (find) Select
', allowedTo('view_ip_address_any']) ? '' : ' disabled="disabled"', '

Code (replace) Select
', allowedTo('view_ip_address_any') ? '' : ' disabled="disabled"', '

smokester

You see, now my bad practices are rubbing off on you..

Just one thing, did you alter any of the other code from original mod? As if you didn't I should be able to force this through rather than backward modifying the files that the original mod altered.

Thanks

Arantor

I don't think I did; each new edit was done to the end of the install file, meaning that after I added the Who.php edits (for who's online), I did three edits to ManageMembers.php and one to ManageMembers.template.php.

smokester

Just tried it on another new install and it works perfectly with the "view ip" permission hiding and bringing back the IP column in the "view members" panel.

Fantastic job Arantor and this really does separate out the IP permission which has to be very useful in many circumstances.

I owe you a beer or 3.

Arantor

I'm just glad it all works as it's supposed to - I don't drink any more, but thanks anyway :)

For anyone else: it's also listed on the mod site, pending approval from SMF Customization Team (using the fixed version!) under http://custom.simplemachines.org/mods/index.php?mod=2286

smokester

Any chance this could be updated for SMF 2.0 please?

Thank you.

Illori

please post in the mods support thread if you wish to get it updated

Advertisement: