• Resolved tulbox

    (@tulbox)


    Is there a way to allow editors to view the contact form submissions? Would prefer not to allow access as an administrator.

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author Arshid

    (@arshidkv12)

    Please use role editor plugin.

    Thread Starter tulbox

    (@tulbox)

    Thanks!

    Hi @arshidkv12

    can you please give role editor plugin link? as cfdb7 menu not showing in any role except admin role.

    Thanks,

    Thread Starter tulbox

    (@tulbox)

    Hi, could somebody tell me how to add the capability with User Role Editor ? Would be nice.

    Thank you

    EDIT: I mean, there is no capability to enable, so I guess I have to add additional code to my theme’s functions.php ?

    • This reply was modified 6 years, 10 months ago by someai.

    Yes, i have the same question! I can see that you can add a capability to a user, but where do I specify what the capability means/has to do? I also would like to let editors to view the contact form submissions.

    Same question…. User role editor does not show capabilities. How do I go about adding permissions for the Editor role?

    Plugin Author Arshid

    (@arshidkv12)

    Alternative method:-
    Change menu page role in cfdb7 files.

    Hi Arshid,

    We did as you suggested by changing manage_options by manage_cf7db and did in admin-mainpage.php:

    add_menu_page( 'Contact Forms', 'Contact Forms', 'manage_cf7db', 'cfdb7-list.php', array($this, 'list_table_page'), 'dashicons-list-view' );
    

    Then in another plugin on activate :

    $role = get_role("editor")
    $role->add_cap( "manage_cf7db" )

    The problem is now that if you publish an update of your plugin we will lose this change. Would it make sense to you to make the same modification in your plugin, allowing it to have more fine permissions settings ?

    Thanks
    Nicolas

    • This reply was modified 6 years, 6 months ago by nottavi.

    I solved it in my theme function like this:

    
        // set editor role for contact-form-cfdb-7 plugin
        include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
        if ( is_plugin_active( 'contact-form-cfdb7/contact-form-cfdb-7.php' ) ) {
            // Add custom capability
            $role = get_role( 'editor' );
            if(!$role->has_cap('cfdb7_access')){
                $role->add_cap( 'cfdb7_access' );
            }
        }
    

    It works, but I am not sure if that is a good solution.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Allow user in editor role to view’ is closed to new replies.