Status filter view_history_capability – allow only admin users
-
Hello,
can you confirm that this code is not necessary anymore when using Partial Stealth Mode introduced in version 5.6?
I have added this code to every single website to only allow Admins to access Simple History, because in my eyes Simple History is an Admin tool. But I am not sure anymore if I perhaps missed something in the changelogs in the last approx. 2 years.
From current testing without this code every user has access to Simple History (also editors). If Partial Stealth Mode is enabled, then this will take over, meaning no one has access except the users mentioned in Partial Stealth Mode.
I wonder, could this be in the settings as well? In the initial stage it could be a simple checkbox.
/**
* Change capability required to view main simple history page.
* Default capability is "edit_pages". Change to for example "manage options"
* to only allow admins to view the history log.
*/
add_filter('simple_history/view_history_capability', function ($capability) {
$capability = 'manage_options';
return $capability;
});Thanks for your information about this
best regards
Markus
- You must be logged in to reply to this topic.