Skip to content

Commit

Permalink
Fixed: only redirect users to the wizard with the proper capabilities.
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan0sz committed Feb 7, 2024
1 parent e5b269a commit d0793f2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Admin/Actions.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ public function register_assets( $current_page ) {
* @return void
*/
public function maybe_redirect_to_wizard() {
// Make sure it only runs when requested by a browser.
if ( wp_doing_ajax() || wp_doing_cron() ) {
// Make sure it only runs when requested by (an admin in) a browser.
if ( wp_doing_ajax() || wp_doing_cron() || ! current_user_can( 'manage_options' ) ) {
return;
}

Expand Down

0 comments on commit d0793f2

Please sign in to comment.