Admin v Editor Access

Hi, I would like to restrict my Wordpress Editors to only access certain things in Beaver Builder.

I realise there are a couple of options to change the capabilities, but I don’t think Beaver Builder goes far enough.

For instance i don’t want them accessing Tools -> Global Settings and messing about with the CSS or changing the options.

Is there a way to prevent editors accessing this?

Beaver Builder plugin is great - but I think this is crucial functionality to have to restrict access.

Please let me know how I can do this. Or if not is it planned in the future?

Thanks.

Regards,

Rob.

Hey Rob,

Welcome to the BB forums! :slight_smile:

That is certainly possible! You can set a capability required for users to be able to edit BB content under Settings > Page Builder > Editing. If the user/role doesn’t have the capability that you set there, he/she won’t be able to move/add/delete rows, nor does he/she have access to the Tools menu. You can also read the KB article below for more info.
http://forum.wpbeaverbuilder.com/knowledge-base/admin-settings/#editing

Hope this helps, and let us know if we can assist further!

Ben

Hi Ben, Thanks I realise there is that option. But if i change those capabilities then editors can’t do really basic things like add rows, add text.

I want them to be able to use Beaver Builder to create new pages. I don’t want them however touching css or making changes under Tools.

As far as I can tell its an all or nothing approach at the moment. If i restrict them to getting to Tools, then they can’t even choose a template that I have created for them when they create a new page. They can’t also add text blocks or anything.

I would like to see Beaver be able to give editors access to use Beaver Builder - but not mess with the advanced stuff. More options to restrict stuff to editors would be great.

I have seen others request this in other posts so I hope its something that you would kindly look into as I think its crucial.

A lot of developers go to great lengths to configure Wordpress Editors not to be able to mess up other plugins. Then only to find we can’t prevent access in Beaver without making it un-usable for them.

Thanks.

Rob

Gotcha! Did you only want to remove the Tools button? Unfortunately, we don’t have a way to do that for now. But there will be one once 1.8 hits beta probably next week. You might want to play around with it by then. :slight_smile:

In the meantime, the only way around it would be to hide the button via CSS.

Ben

That sounds great Ben. Its great to know that’s in the pipeline.

I can sleep easier when I know my clients can’t mess things up! :slight_smile:

Yes just the tools button I think - although its nice to have decent options to switch things on or off for editors. But certainly the ability to turn these things off for editors that could do the most damage.

All the best.

That makes sense. We’ll probably write a blog entry for when we release the beta version. You might want to watch out for that so you can get a glimpse of the changes/enhancements, as well as try it out yourself.

I’ll go ahead and mark this topic resolved for now.

Have fun! :slight_smile:

Ben

Thanks Ben, that’s great. Also what would be cool is in the page builder settings, in modules where you can tick to enable or disable the modules. It would be great if you could tick which modules for which role. e.g. You could tick the modules editors get access too which might be different to which someone ticks for admin.

You can actually do that right now using the fl_builder_register_module filter. You can place it inside a current_user_can condition then set which modules you’d like to enable for that role.
http://forum.wpbeaverbuilder.com/knowledge-base/filter-reference/

Give it a shot and let us know how it goes!

Ben

Hi Ben,

Sorry for the late reply. Thats great, works a treat. If anyone interested this is what I added to my functions.php to disable certain modules and also all of the widgets

if(!current_user_can('administrator') ) {
function my_builder_register_module( $enabled, $instance ) {

    $disable = array( 'button', 'html', 'heading', 'accordion', 'cta', 'callout', 'contact-form', 'content-slider', 'countdown', 'gallery', 'icon', 'icon-group', 'map', 'menu', 'numbers', 'post-grid', 'post-carousel', 'post-slider', 'pricing-table', 'sidebar', 'slideshow', 'social-buttons', 'subscribe-form', 'tabs', 'testimonials', 'widget' );

    if ( in_array( $instance->slug, $disable ) ) {
        return false;
    }

    return $enabled;
}
add_filter( 'fl_builder_register_module', 'my_builder_register_module', 10, 2 );
}

I should add the code I added was to disable the modules for everyone except admins.

One final thing Ben, going back to what I initially requested regarding hiding the “Tools” button. Ideally i think just the Global Settings and Layout Settings would want hiding.

I personally would still like editors to have the ability to Save Templates and Duplicate Layouts.

Thanks again for all your help.

Hey Rob,

On v1.8 alpha, we’ve added a JS filter which you can use to remove those. The JS code below should do it.

(function($) {
  $(function() {
    FLBuilder.addHook( 'actions-lightbox-settings', function( e, settings ){
      if ( 'fl-builder-tools-actions' == settings.className ) {            
        delete settings.buttons[ 30 ];
        delete settings.buttons[ 40 ];
      }
    });
  })
})(jQuery);

Feel free to modify the code to cater your needs. :slight_smile:

Ben