Skip Navigation

[Resolved] Hiding Toolset Blocks

This support ticket is created 5 years, 2 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 9 replies, has 2 voices.

Last updated by logicelf 5 years, 2 months ago.

Assisted by: Christian Cox.

Author
Posts
#1356411

Hi,

I may be missing something - but I'm using the Views beta with block-based layouts, and I can't work out how to hide the Toolset blocks from editor-level logins.

To clarify: I want to be able to allow editors to create and manage custom post types I've defined, and add previously-defined field groups and repeatable fields, etc.to those posts - but I don't want them to be able to see and use all the Toolset blocks in the Gutenberg UI. They don't need them, and they'll break everything.

Any pointers?

Thanks!

James

#1356473

Hi, let me ask my developers if there is a public API for managing who sees the Toolset blocks in the block editor. I'm not aware of one but I'll let you know what I find out.

#1356589

Thanks, Christian - that would be great.

#1357145

Hi, our developers got back to me and let me know there is no public API for managing individual blocks in the block editor interface. They mentioned some uncertainty about how this could work. Let's say you want to disable the "conditional" block for Editors. What happens if an admin User creates a post and uses the conditional block in the post contents, then the Editor needs to make a minor text change? If the conditional block is completely disabled for Editors, when the Editor saves the update, it would also delete the existing conditional block(s).

Or maybe you were suggesting that an existing conditional block would appear in the post content / builder, but would not be available in the Block menu so Editors could not insert new conditional blocks? At any rate, feel free to add a request for a new feature in our form here: https://toolset.com/home/contact-us/suggest-a-new-feature-for-toolset/
Please elaborate on how it would work considering the scenario I described, and add any more details you can think of.

#1357237

Thanks for getting back to me, Christian.

"Or maybe you were suggesting that an existing conditional block would appear in the post content / builder, but would not be available in the Block menu so Editors could not insert new conditional blocks?"

That's precisely it - I just don't want Editors browsing for and adding new Toolset blocks (we give our clients Editor user accounts, or Editor with user promote). I'm a bit concerned that - while I can mostly avoid this by building with Views in the 2.9 channel (and the only thing the Editor will be able to do is add predefined Views) - as everything moves to 3.0 with a focus on Gutenberg, all these new Toolset Blocks are going to appear for them.

#1357365

I see what you mean. I think a feature request is the best way to proceed here. Provide these details in your submission so our developers can evaluate your idea and determine if it's something we should add to the software. In the meantime, a custom CSS or JavaScript approach might be more feasible. A skilled developer could create a stylesheet or custom JavaScript file for the admin area that is only loaded for these Editor Users. Then use JavaScript and/or CSS to hide each button or button group.

https://codex.wordpress.org/Plugin_API/Action_Reference/admin_enqueue_scripts

#1358721

Feature request submitted. Noted re: hiding things with CSS.

Thanks for your support, Christian.

#1359085

Thanks for you input. I heard about the feature request from a colleague earlier today and I'm optimistic that we will have Access control for Toolset Blocks in an upcoming release.

#1359091

Yes, Amit said he was adding to your roadmap - fantastic. Thanks again, Christian. 🙂

#1359093

/closing