Problem/Motivation

Administrators and others should not need to load & run antibot. This reduces loaded assets and prevents side-effects.
Such a "skip" is already implemented in similar modules like "Captcha", "Honeypot", ... and would also make sense here

Steps to reproduce

Proposed resolution

Add "Skip Antibot" permission and exclude the selected roles from antibot execution.

Remaining tasks

User interface changes

API changes

Data model changes

CommentFileSizeAuthor
#9 3263848-9.patch1.62 KBgaurav.kapoor
#4 3263848-4.patch894 bytesgaurav.kapoor

Issue fork antibot-3263848

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

Anybody created an issue. See original summary.

anybody’s picture

Title: Add "Skip anibot" permission like other modules do to not run antibot for privileged users » Add "Skip Antibot" permission like other modules do to not run antibot for privileged users
gaurav.kapoor’s picture

Assigned: Unassigned » gaurav.kapoor
gaurav.kapoor’s picture

Status: Active » Needs review
StatusFileSize
new894 bytes

Added permission and simple logic to prevent the loading of Antibot for users with the respective permission.

gaurav.kapoor’s picture

Assigned: gaurav.kapoor » Unassigned
gaurav.kapoor’s picture

Version: 8.x-1.x-dev » 2.0.x-dev
anybody’s picture

Very cool @gaurav.kapoor - nice work!

RTBC +1

anybody’s picture

Status: Needs review » Needs work

Just had another look at the full code and I think the "Show form ID" functionality should then be moved before the if clause, otherwise it will never be visible to these users.

gaurav.kapoor’s picture

Status: Needs work » Needs review
StatusFileSize
new1.62 KB

I completely forgot we had that feature for debugging forms. Modified the logic a little bit to make sure both skip and administer antibot permissions are respected.

anybody’s picture

Thank! The patch is hard to read, would you perhaps mind to create it as issue fork here?

Further simplification and better readability:

if (!$skip_antibot) {

instead of

if ($skip_antibot == FALSE) {

gaurav.kapoor’s picture

Added MR and also did changes as per #10.

anybody’s picture

Status: Needs review » Reviewed & tested by the community

Perfect, thanks! :)

  • gaurav.kapoor committed 26d6a0a on 2.0.x
    Issue #3263848: Add "Skip Antibot" permission like other modules do to...
gaurav.kapoor’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.