Skip to content

Commit

Permalink
Check against a capability, not a role
Browse files Browse the repository at this point in the history
  • Loading branch information
schlessera committed Mar 21, 2020
1 parent d229af9 commit 6542b7e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/BackgroundTask/CronBasedBackgroundTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public function register() {
* @return void
*/
public function schedule_event() {
if ( ! current_user_can( 'administrator' ) ) {
if ( ! current_user_can( 'manage_options' ) ) {
return;
}

Expand Down

0 comments on commit 6542b7e

Please sign in to comment.