Skip to content

Commit

Permalink
Add capability check before regenerating the logs
Browse files Browse the repository at this point in the history
Just in case. By default, only users with the `manage_options`
capability can view the Points Logs screen anyway.
  • Loading branch information
JDGrimes committed Jul 31, 2014
1 parent 968c55f commit d3cb7af
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/points-logs-regenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ function wordpoints_points_logs_regenerator_regenerate() {
*/
function worpdoints_points_logs_regenerator_form() {

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

if ( isset( $_POST['regenerate_points_logs'] ) ) {

check_admin_referer( 'wordpoints_points_logs_regenerator' );
Expand Down

0 comments on commit d3cb7af

Please sign in to comment.