• Resolved vindani

    (@vindani)


    Hi Everyone,
    I’ve been trying to allow access for other roles than administrator to have full access of this plugin.As I think that I looked up that there are no user management function in CDBT and I have no desire to use role management plugins (I try to minimise plugins as much as I can), I already put some codes in the functions.php as follows

    function add_editor_access(){
        $role = get_role('editor');
        $role->add_cap('list_users');
        $role->add_cap('edit_users');
        $role->add_cap('delete_users');
    }
    add_action('admin_init','add_editor_access');

    I can’t find the add_cap parameter for CDBT plugin, where do I look it up or can anyone tell me what the parameter is?

    https://wordpress.org/plugins/custom-database-tables/

Viewing 3 replies - 1 through 3 (of 3 total)
  • you can use advanced accesss manager to grant access for user and Admin menu editor to allows you to edit admin page menu

    Plugin Author ka2

    (@ka2)

    Thank you for your inquiry.

    Actually, this CDBT plugin has filter of user capability for the administrator menu.
    The way to use is as follows:

    function custom_cdbt_operating_capability( $capability ){
    
      $capability = 'edit_posts'; // enable access by contributor
    
      return $capability;
    }
    add_filter( 'cdbt_operating_capability', 'custom_cdbt_operating_capability' );

    However, it may be not able to manage the table by set permission in each table, even though user that is allowed to access cdbt menu.

    Thank you,

    Thread Starter vindani

    (@vindani)

    Hi Everyone,
    Apparently I managed to do it on the Shortcodes section of the plugin and set the cdbt-edit to editor now.

    It works now, and the editor role can now manage CDBT plugin as we intended, I thank you for the support.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘allow other roles to access CDBT’ is closed to new replies.