Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Problem
- Create a view of users, add VBO to it, and select all actions matching for users.
- List users. Choose some troll on your site and hit "Ban IP address..."
Goal
- At minimum, the code should clarify what it does.
Solution
- Attached patch implements that in the most trivial way.
Comment | File | Size | Author |
---|---|---|---|
#4 | drupal8.ban-ip-action-remove.4.patch | 1.79 KB | sun |
#3 | ban_IP.png | 55.64 KB | mbyrnes |
drupal8.block-ip-action.0.patch | 2.64 KB | sun | |
Comments
Comment #1
Tor Arne Thune CreditAttribution: Tor Arne Thune commentedTwo lines surpass 80 characters.
Comment #2
chx CreditAttribution: chx commentedLet's consider then eaton's masterpiece http://drupal.org/files/issues/settings.php_1.patch too :P
Comment #3
mbyrnes CreditAttribution: mbyrnes commentedThanks to Sun for drawing attention to this issue. The only thing that I like better than ASCII art is the Drupal community of developers listening to their users. Having seen this happen to Drupal site managers three times and discussing it at several Drupal camps with various folks, I'm really excited to see that it is being raised in the issue queue for D8.
Here are some links to past mentions of the issues:
http://drupal.org/node/148410
http://drupal.org/node/556570
Comment #4
sunDespite the original patch, this issue is actually not a joke.
Given the current state of the entity system and action system, I doubt that anyone of us will have time to work on a completely revamped, properly implemented ban IP action.
Therefore:
To prevent further havoc in D8 for innocent users, I strongly recommend to remove this flawed action entirely.
It can be re-implemented in contrib, in case anyone actually has a use-case for it. (Dare I say I doubt that.)
This removal gets more important, since there is a good chance that we'll actually have #1823574: [Meta] Improve the Views Bulk Operations (VBOs) that are in core for D8, in which case it would be Drupal core and no longer a contributed module that is exposing this option as a possible action. We definitely do not want that.
Thus, good bye, ban_ip_action().
Comment #5
sunComment #6
sun#4: drupal8.ban-ip-action-remove.4.patch queued for re-testing.
Comment #7
sun#4: drupal8.ban-ip-action-remove.4.patch queued for re-testing.
Comment #8
sunFeedback, anyone?
Comment #9
cweagansPatch is simple and sane. Looks good to me.
Comment #10
catchi really wanted to commit the original patch.
But instead i committed #4. Allowing people to block themselves and only unblock via raw database access seems a bit wrong. Thanks!
Comment #11
sunChange notice: http://drupal.org/node/1844972
Comment #12
sunAaaand... let me directly complement this removal with this newborn feature request:
#1844992: Allow to ban an entity author's IP address through an action (or entity operation)
That's the pragmatic way. And dare I say, I really love it for this special case of issues: First, make sure to prevent further havoc, and only afterwards, try to re-introduce lost functionality in a proper way.
Thanks all! :)