Skip to content

Commit

Permalink
check for capability before loading standalone
Browse files Browse the repository at this point in the history
  • Loading branch information
dannyvankooten committed Oct 23, 2023
1 parent 2b3de4c commit 15ad179
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/class-admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ public function maybe_load_standalone(): void
return;
}

if (!current_user_can('view_koko_analytics')) {
return;
}

$this->register_scripts();
require KOKO_ANALYTICS_PLUGIN_DIR . '/views/standalone.php';
exit;
Expand Down

0 comments on commit 15ad179

Please sign in to comment.