Skip to content

Commit

Permalink
If multisite use manage_network_options priviledge
Browse files Browse the repository at this point in the history
  • Loading branch information
guillaumemolter committed Aug 6, 2016
1 parent 9dfe2f3 commit a1b8cd0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions postmark.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ function send_test_email() {
}

// We check that the current user is allowed to update settings.
if ( ! current_user_can('manage_options') ) {
if ( ( is_multisite() && ! current_user_can('manage_network_options') ) || ! current_user_can('manage_options') ) {
wp_die(__('Cheatin’ uh?'));
}

Expand Down Expand Up @@ -140,7 +140,7 @@ function save_settings() {
}

// We check that the current user is allowed to update settings.
if ( ! current_user_can('manage_options') ) {
if ( ( is_multisite() && ! current_user_can('manage_network_options') ) || ! current_user_can('manage_options') ) {
wp_die(__('Cheatin’ uh?'));
}

Expand Down

0 comments on commit a1b8cd0

Please sign in to comment.