| @@ -659,10 +659,15 @@ | ||
| 659 | 659 | if ( $bypass || ! is_user_logged_in() ) { |
| 660 | 660 | return false; |
| 661 | 661 | } |
| 662 | 662 | |
| 663 | + // Get the whitelisted roles. | |
| 664 | + $roles = $this->get_option( 'patchstack_basic_firewall_roles', array( 'administrator', 'editor', 'author' ) ); | |
| 665 | + if ( ! is_array ( $roles ) ) { | |
| 666 | + return false; | |
| 667 | + } | |
| 668 | + | |
| 663 | 669 | // Special scenario for super admins on a multisite environment. |
| 664 | - $roles = $this->get_option( 'patchstack_basic_firewall_roles', array( 'administrator', 'editor', 'author' ) ); | |
| 665 | 670 | if ( in_array( 'administrator', $roles ) && is_multisite() && is_super_admin() ) { |
| 666 | 671 | return true; |
| 667 | 672 | } |
| 668 | 673 | |