• Hey all, for some reason editors have access to my activity log via the admin dashboard. Is there any way to turn this off?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter Steven

    (@shyzer)

    I confirmed the behavior on two different live sites as well as a local-install on my dev machine.

    All three Editor accounts had access to the Activity Logs.

    Hi, I’ve got this problem too, only admins and super admins should see the activity, could you fix this?

    According to what I can find in the code, the capability that is required to view this is edit_pages (an Editor roll capability) which I found in the class-all-admin-ui.php file but there doesn’t seem to be any filter or way to change it.

    However, if your comfortable with code you can write a little plugin with this code in it:

    function prefix_remove_pages_below_admin() {
    
      if ( ! current_user_can( 'manage_options' ) ) {
    
    		remove_menu_page( 'activity_log_page' );
    
      }
    }
    add_action( 'admin_menu', 'prefix_remove_pages_below_admin', 100 );

    This checks to see if the current user has permissions to manage_options (an Administrator roll capability) and if they do not, it will hid the menu. However if the user knows the url they can still get there, and its not a built in solution, so its not perfect. But it will work until the functionality is added.

    Thread Starter Steven

    (@shyzer)

    Hey Eric, thanks. I agree it’s a passable patch until the functionality is added, but it’s better than nothing! Much appreciated.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Editor Has Access?’ is closed to new replies.