Change WordPress user roles and capabilities Forums How to or FAQ How to give access to Redirections plugin

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #4488
    edering
    Participant

    We use the Redirections Plugin, which appears in Tools. I want to give access to this for a Role. When I choose all 11 items under Redirects (which is under Custom Post Types) as shown here – https://www.screencast.com/t/MoLlXAK77tuj – the Users set to this Role only see the Tools menu item, with nothing in it. What am I doing wrong?

    #4490
    Vladimir
    Keymaster

    You granted access to ‘redirect’ custom post type but not to ‘Tools->Redirection’ menu.
    Bad news: Redirection plugin protect this menu item with ‘administrator’ role by default.
    Good news: It allows to developer to change this default value to your own using custom filter, like this:

    
    add_filter('redirection_role', 'change_redirection_permissions', 10, 1 );
    function change_redirection_permissions($cap) {
    
        $cap = 'manage_options';
        
        return $cap;
    }
    

    Then any role with ‘manage_options’ capability will can access ‘Tools->Redirection’ menu item. You can install this code as a part of your active theme functions.php file or as a separate .php file in a wp-content/mu-plugins folder – read more about Must Use plugins.

    #7384
    edering
    Participant

    hi. We did not change anything, but all of a sudden, Users with a Role (not Admins) who used to be able to access the Redirection plugin, now get taken to the WordPress Dashboard when clicking it. How do I fix this? Do you know what might have changed recently? What is weird is that Redirection does not even appear for me in Users > User Role Editor and under the Group / Custom Post Types. When I log in as an Admin, I see the actual plugin/tool fine. I don’t see this function in my functions file at all, but my client says they have used Redirection many times. I am confused.

    #7385
    Vladimir
    Keymaster

    Hi,

    Is role restricted via “Admin menu access” add-on?
    If Yes, pay attention on the “Technical details – Block not selected” part of the documentation article.

    #7386
    edering
    Participant

    Yes, it is. It is set to Block Selected, and Redirection is not selected. This is used to work fine until recently. The documentation says an issue could occur if it is set to Block: Not Selected.

    #7387
    Vladimir
    Keymaster

    Yes, in general, redirection is a result of additional parameters in URL under “Block: Not Selected” model.

    What will be, if you temporally turn OFF the “Activate Administrator Menu Access module” checkbox at URE settings. Will redirection still take place?

    #7389
    edering
    Participant

    Two questions before I try that. 1) If I disable that, and then turn it back on, will all the blocked item per Role be saved? 2) Does this mean anything? https://www.screencast.com/t/6EL4Nm5lKC

    #7390
    Vladimir
    Keymaster

    Activate/deactivate add-on is safe – all settings made for add-on are in place.
    Settings are deleted only upon plugin deletion via WordPress.
    If you will confirm that redirection to WP dashboard is due to URE Pro “Admin menu access”, I will need 2 screenshots in addition:
    1) “Users->User Role Editor->Admin menu” made for the tested role;
    2) “Tools->Redirection” page with browser URL address visible at the top.

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.