Closed (duplicate)
Project:
Fasttoggle
Version:
5.x-1.1
Component:
Code
Priority:
Minor
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
10 Jan 2010 at 08:02 UTC
Updated:
12 Apr 2010 at 06:22 UTC
I recently installed this module and didn't like the idea that one of my mods could accidentally block me on my own site, really easily, so I added a small modification to the code, to prevent the active/block link from even displaying in the author pane.
Personally I think it'd be a good idea to add it to the releases, but if not, here is what I did for anyone else who may want it.
In advf-author-pane.tpl around line 62, change:
if (!empty($fasttoggle_block_author)):
to
if (!empty($fasttoggle_block_author) && ($account_id != 1)):
Comments
Comment #1
AppleBag commentedForgot to tag those with code tags, so they didn't show up quite right.
<?php if (!empty($fasttoggle_block_author)): ?>to
<?php if (!empty($fasttoggle_block_author) && ($account_id != 1)): ?>Comment #2
michelleThis is a good idea but not a good way to do it. Fasttoggle itself should be blocking attempts to block UID 1. Moving it to their queue.
Michelle
Comment #3
kkaefer commentedNot sure if this makes sense. If you have permission to block users, you can block any users using the administration pages anyway. Fasttoggle just facilitates it.
Comment #4
AppleBag commentedI did mess around a bit with the fasttogglemodule, but it wasn't really behaving, so I did it instead in advf. I had seen a post in their issues queue requesting it, and it didn't appear anyone was planning on doing anything about it anytime soon.
I do realize it's still possible for people with those permissions to block an admin, but having the link right there in front of their faces makes it too tempting and easy imo. For example, my mods never even knew it was possible, but the minute I enabled the module, the very first thing one of them did was test it by blocking and unblocking me, lol.
Comment #5
grendzy commented#217253: Should user1's status (enable/block) be excluded from toggle operation?
Comment #6
mr.j commentedhttp://drupal.org/project/userprotect
That might help but not sure if fasttoggle bypasses any protections it puts in place.