Skip to content

Disable fields in ui_component by user role

We are using the WeltPixel Peal theme. Ultimately, I’d like to prevent specific User Roles from having access to the Custom CSS/JS fields that WeltPixel adds.

WeltPixel Custom CSS fields

These are the file paths where these fields are getting set currently:

/app/code/WeltPixel/DesignElements/view/adminhtml/ui_component/category_form.xml
/app/code/WeltPixel/DesignElements/view/adminhtml/ui_component/cms_block_form.xml
/app/code/WeltPixel/DesignElements/view/adminhtml/ui_component/cms_page_form.xml

I think I can do this by moving them out of its current fieldset and into its own fieldset and then create an ACL for the new fieldset.

Would I create a new module to do this? Or is there another way I can achieve this?