Great! Did not notice while browsing the docs! Thank you very much. I will check it out 🙂
-
This reply was modified 5 years, 7 months ago by
saschapi.
Hi John @johnny5
This worked. However I know get an error about the RST API not working when a restricted users checks the Redirection pages.
Here is my code:
//Redirect plugin permissions for DFH editors
add_filter( 'redirection_role', function( $role ) {
return 'edit_posts'; // Add your chosen capability or role here
} );
add_filter( 'redirection_capability_check', function( $capability, $permission_name ) {
if ( $permission_name === 'redirection_cap_io_manage' || $permission_name === 'redirection_cap_log_manage' ) {
return $capability;
}
return 'manage_options';
}, 10, 2 );
Error message:
Something went wrong. You have no permission to do this (rest_forbidden)
If I login as admin everything works as expected.
Do you have any idea how I can fix this?
Cheers Sascha
If you are seeing that error when accessing the plugin page then it is because the plugin is mistakenly showing your a page you are not allowed to view. If you navigate to a page your are allowed to view then the error is not shown. This will be fixed in the next version of the plugin.